Reuse WebGL ImageKeys after a resize.

This commit is contained in:
Imanol Fernandez 2017-08-31 22:54:33 +02:00
parent 174c37fddd
commit 21f8b519c3
2 changed files with 43 additions and 41 deletions

View file

@ -264,10 +264,6 @@ impl WebGLRenderingContext {
return;
};
// Reset webrender_image because resize creates a new image_key.
// The new image key is set in the next handle_layout() method.
self.webrender_image.set(None);
// ClearColor needs to be restored because after a resize the GLContext is recreated
// and the framebuffer is cleared using the default black transparent color.
let color = self.current_clear_color.get();