Skip to content
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

Clear canvas thread state on recreation. #17609

Merged
merged 1 commit into from Jul 11, 2017

Conversation

asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 5, 2017

The canvas rendering context is cleared when it is recreated, but not the matching state in the canvas paint thread.



This change is Reviewable

@asajeffrey asajeffrey added the A-content/canvas 2d canvas API label Jul 5, 2017
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 5, 2017
@@ -544,6 +544,8 @@ impl<'a> CanvasPaintThread<'a> {

fn recreate(&mut self, size: Size2D<i32>) {
self.drawtarget = CanvasPaintThread::create(size);
self.state = CanvasPaintState::new(self.state.draw_options.antialias == AntialiasMode::Default);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you file a E-Easy follow-up issue about using AntialiasMode directly in CanvasPaintState::new while at it? CanvasPaintState uses AntialiasMode too internally, setting the value from the boolean parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #17668.

@jdm
Copy link
Member

jdm commented Jul 11, 2017

@bors-servo: r+

@bors-servo
Copy link
Contributor

📌 Commit 0b7a43d has been approved by jdm

@highfive highfive assigned jdm and unassigned pcwalton Jul 11, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 11, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 0b7a43d with merge bc1ac6e...

bors-servo pushed a commit that referenced this pull request Jul 11, 2017
Clear canvas thread state on recreation.

<!-- Please describe your changes on the following line: -->

The canvas rendering context is cleared when it is recreated, but not the matching state in the canvas paint thread.

---
<!-- 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 #17533
- [X] These changes do not require tests because the css-paint-api tests test for this already.

<!-- 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/17609)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 11, 2017
@bors-servo
Copy link
Contributor

⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only mac-rel-wpt1...

@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: jdm
Pushing bc1ac6e to master...

@bors-servo bors-servo merged commit 0b7a43d into servo:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/canvas 2d canvas API S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canvas thread doesn't clear its state on recreation
6 participants