pass width and height information through to cef paint callback

This commit is contained in:
Mike Blumenkrantz 2015-05-18 15:37:49 -04:00
parent 9f7aacdacf
commit fb72a64833
6 changed files with 10 additions and 11 deletions

View file

@ -1292,6 +1292,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
if !self.context.is_some() {
return None
}
let (width, height) =
(self.window_size.width.get() as usize, self.window_size.height.get() as usize);
if !self.window.prepare_for_composite(width, height) {
return None
}
@ -1305,9 +1307,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
_ => {}
}
let (width, height) =
(self.window_size.width.get() as usize, self.window_size.height.get() as usize);
let (framebuffer_ids, texture_ids) = match target {
CompositeTarget::Window => (vec!(), vec!()),
_ => initialize_png(width, height)