From f34f2d9d0ab59dd4baa6a3a25849ece95861c461 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Tue, 18 Feb 2025 15:50:41 +0100 Subject: libservo: Expose `SoftwareRenderingContext` and `WindowRenderingContext` (#35501) Expose two easy-to-use wrappers around `SurfmanRenderingContext` that make the API simpler to use: - `WindowRenderingContext`: This `RenderingContext` is a newtype around `SurfmanRenderingContext` takes a `raw-window-handle` display and window and creates a full window rendering context. - `SoftwareRenderingContext`: is wraps `SurfmanRenderingContext` and adds a swap chain in order to expose a software GL rendering context. Signed-off-by: Martin Robinson --- components/servo/webview.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'components/servo/webview.rs') diff --git a/components/servo/webview.rs b/components/servo/webview.rs index e659e5d3073..f7264607d37 100644 --- a/components/servo/webview.rs +++ b/components/servo/webview.rs @@ -414,4 +414,8 @@ impl WebView { .constellation_proxy .send(ConstellationMsg::SendError(Some(self.id()), message)); } + + pub fn paint_immediately(&self) { + self.inner().compositor.borrow_mut().composite(); + } } -- cgit v1.2.3