Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement drawing an image from a CSS style value into a canvas #17634
Conversation
highfive
commented
Jul 7, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jul 7, 2017
| // Paint worklets may depend on custom properties, | ||
| // so if they have changed we should repaint. | ||
| if old.get_custom_properties() != new.get_custom_properties() { | ||
| damage.insert(REPAINT); |
This comment has been minimized.
This comment has been minimized.
emilio
Jul 11, 2017
Member
I think this could be too overkill... Could we do better? I guess this is fine for now.
This comment has been minimized.
This comment has been minimized.
asajeffrey
Jul 11, 2017
Author
Member
Not sure how much better we could do, rather annoyingly. We could try to be smart about which properties are being monitored by a paint worklet.
| @@ -388,9 +373,9 @@ impl WorkletThreadRole { | |||
| #[derive(Clone)] | |||
| struct WorkletThreadInit { | |||
| /// Senders | |||
| primary_sender: Sender<WorkletData>, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
asajeffrey
Jul 11, 2017
Author
Member
Not sure what would be added here, other than "the sender to the primary worklet thread" :)
|
|
17be732
to
7c800a9
|
|
7c800a9
to
bf8bcd9
|
If #17625 is addressed before this lands, e.g. by @brainlessdeveloper in #17812, we can remove |
| // Any missing image URLs. | ||
| missing_image_urls: DOMRefCell<Vec<ServoUrl>>, | ||
| // The base URL for resolving CSS image URL values. | ||
| // Needed because of https://github.com/servo/servo/issues/17625 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bf8bcd9
to
2318caf
|
@bors-servo r=jdm |
|
|
Implement drawing an image from a CSS style value into a canvas <!-- Please describe your changes on the following line: --> Implemented drawing a CSS style value into a canvas, which is needed for the Houdini CSS Paint API. This PR is dependent on #17364. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17432. - [X] These changes do not require tests because the existing CSS paint API wpt test cases test this behaviour. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17634) <!-- Reviewable:end -->
|
|
asajeffrey commentedJul 7, 2017
•
edited by larsbergstrom
Implemented drawing a CSS style value into a canvas, which is needed for the Houdini CSS Paint API.
This PR is dependent on #17364.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is