diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 7560fcf5c22..7d8bf020e5b 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -48,7 +48,6 @@ use webvr_traits::WebVRMainThreadHeartbeat; #[derive(Debug, PartialEq)] enum UnableToComposite { - WindowUnprepared, NotReadyToPaintImage(NotReadyToPaint), } @@ -1212,10 +1211,8 @@ impl IOCompositor { .framebuffer .to_u32() .height_typed(); - if !self.window.prepare_for_composite() { - return Err(UnableToComposite::WindowUnprepared); - } + self.window.prepare_for_composite(); self.webrender.update(); let wait_for_stable_image = match target { diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index fa9f8c481fb..28e1cf1f6eb 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -142,9 +142,8 @@ pub trait WindowMethods { /// Presents the window to the screen (perhaps by page flipping). fn present(&self); /// Requests that the window system prepare a composite. Typically this will involve making - /// some type of platform-specific graphics context current. Returns true if the composite may - /// proceed and false if it should not. - fn prepare_for_composite(&self) -> bool; + /// some type of platform-specific graphics context current. + fn prepare_for_composite(&self); /// Return the GL function pointer trait. #[cfg(feature = "gl")] fn gl(&self) -> Rc; diff --git a/ports/glutin/headed_window.rs b/ports/glutin/headed_window.rs index e2fa3f79c6b..5a07adf9093 100644 --- a/ports/glutin/headed_window.rs +++ b/ports/glutin/headed_window.rs @@ -510,9 +510,8 @@ impl WindowMethods for Window { self.animation_state.set(state); } - fn prepare_for_composite(&self) -> bool { + fn prepare_for_composite(&self) { self.gl_context.borrow_mut().make_current(); - true } } diff --git a/ports/glutin/headless_window.rs b/ports/glutin/headless_window.rs index c14228048b7..6357ad04a9c 100644 --- a/ports/glutin/headless_window.rs +++ b/ports/glutin/headless_window.rs @@ -194,7 +194,5 @@ impl WindowMethods for Window { self.animation_state.set(state); } - fn prepare_for_composite(&self) -> bool { - true - } + fn prepare_for_composite(&self) { } } diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs index baafef8aa63..7f0672a4f4a 100644 --- a/ports/libsimpleservo/api/src/lib.rs +++ b/ports/libsimpleservo/api/src/lib.rs @@ -580,10 +580,9 @@ impl EmbedderMethods for ServoEmbedderCallbacks { } impl WindowMethods for ServoWindowCallbacks { - fn prepare_for_composite(&self) -> bool { + fn prepare_for_composite(&self) { debug!("WindowMethods::prepare_for_composite"); self.host_callbacks.make_current(); - true } fn present(&self) {