diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 3e6e3ba74f8..435860f3453 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -2388,25 +2388,6 @@ impl IOCompositor { self.shutdown_state != ShutdownState::FinishedShuttingDown } - /// Repaints and recomposites synchronously. You must be careful when calling this, as if a - /// paint is not scheduled the compositor will hang forever. - /// - /// This is used when resizing the window. - pub fn repaint_synchronously(&mut self) { - while self.shutdown_state != ShutdownState::ShuttingDown { - let msg = self.port.recv_compositor_msg(); - let need_recomposite = matches!(msg, CompositorMsg::NewWebRenderFrameReady(..)); - let keep_going = self.handle_browser_message(msg); - if need_recomposite { - self.composite(); - break; - } - if !keep_going { - break; - } - } - } - pub fn pinch_zoom_level(&self) -> Scale { Scale::new(self.viewport_zoom.get()) } diff --git a/components/servo/lib.rs b/components/servo/lib.rs index be5e438439b..b21445fda84 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -965,10 +965,6 @@ impl Servo { } } - pub fn repaint_synchronously(&mut self) { - self.compositor.borrow_mut().repaint_synchronously() - } - pub fn pinch_zoom_level(&self) -> f32 { self.compositor.borrow_mut().pinch_zoom_level().get() }