-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose images to the BlobImageRenderer. #1018
Conversation
This seems like a minimal change that doesn't affect other areas anyway. Just need to fix the compile errors on CI, then r=me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me once the CI compile error is fixed.
☔ The latest upstream changes (presumably #1004) made this pull request unmergeable. Please resolve the merge conflicts. |
8739743
to
d2afb9b
Compare
☔ The latest upstream changes (presumably #997) made this pull request unmergeable. Please resolve the merge conflicts. |
@nical Needs another rebase. |
☔ The latest upstream changes (presumably #1160) made this pull request unmergeable. Please resolve the merge conflicts. |
Can we land this? I have work in progress that I need to rebase on top of it. |
@nical sure thing, but it's not mergable atm. |
Woops I missed that. Rebased. |
@@ -116,6 +116,40 @@ struct ImageResource { | |||
dirty_rect: Option<DeviceUintRect> | |||
} | |||
|
|||
struct ImageTemplates { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason for this to be a separate struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is the borrow checker. Without the separate struct the resource cache ends up being "entirely" borrowed when passed to the blob renderer which can't happen because we are already borrowing it partially (the blob renderer itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand. How does this change from the borrowck point of view if you just do type ImageTemplates = HashMap<...>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per IRC discussion, having a separate type allows us to implement ImageStore
, which is needed to abstract away from BlobImageRenderer
@bors-servo r+ |
📌 Commit a29dabc has been approved by |
Expose images to the BlobImageRenderer. See issue #1017. The idea would be to do the same for fonts and paths. r? @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1018) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
See issue #1017. The idea would be to do the same for fonts and paths.
r? @glennw
This change is