Clear canvas thread state on recreation.

This commit is contained in:
Alan Jeffrey 2017-07-05 13:33:21 -05:00
parent 5baea7b732
commit 0b7a43da6b
3 changed files with 2 additions and 8 deletions

View file

@ -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);
self.saved_states.clear();
// Webrender doesn't let images change size, so we clear the webrender image key.
if let Some(image_key) = self.image_key.take() {
self.webrender_api.delete_image(image_key);

View file

@ -1,4 +0,0 @@
[paint2d-composite.html]
type: reftest
expected: FAIL
bug: https://github.com/servo/servo/issues/17533

View file

@ -1,4 +0,0 @@
[paint2d-shadows.html]
type: reftest
expected: FAIL
bug: https://github.com/servo/servo/issues/17533