WR update: draw background before rendering

This commit is contained in:
Paul Rouget 2019-03-21 09:31:33 +08:00
parent 4dcee2f36c
commit a1a20ee516
2 changed files with 4 additions and 0 deletions

View file

@ -1214,6 +1214,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
&self.embedder_coordinates.framebuffer.to_untyped(), &self.embedder_coordinates.framebuffer.to_untyped(),
); );
self.window.gl().clear_color(1.0, 1.0, 1.0, 0.0);
self.window.gl().clear(gleam::gl::COLOR_BUFFER_BIT);
// Paint the scene. // Paint the scene.
// TODO(gw): Take notice of any errors the renderer returns! // TODO(gw): Take notice of any errors the renderer returns!
self.webrender.render(size).ok(); self.webrender.render(size).ok();

View file

@ -242,6 +242,7 @@ where
}, },
renderer_kind: renderer_kind, renderer_kind: renderer_kind,
enable_subpixel_aa: opts.enable_subpixel_text_antialiasing, enable_subpixel_aa: opts.enable_subpixel_text_antialiasing,
clear_color: None,
..Default::default() ..Default::default()
}, },
None, None,