From 57b3beef57ab422a978a80210ddbcb6a0fe77365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 8 May 2026 00:06:51 -0400 Subject: [PATCH] Prepare Servo context before painting --- crates/ely_servo_host/src/runtime.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ely_servo_host/src/runtime.rs b/crates/ely_servo_host/src/runtime.rs index 963a5cc..92897bb 100644 --- a/crates/ely_servo_host/src/runtime.rs +++ b/crates/ely_servo_host/src/runtime.rs @@ -172,6 +172,10 @@ impl ServoHost for SoftwareServoHost { fn paint(&mut self, webview_id: &WebViewId) -> Result<(), ServoHostError> { let webview = self.webview(webview_id)?; + self.rendering_context + .make_current() + .map_err(|_| ServoHostError::RenderingContextNotCurrent)?; + self.rendering_context.prepare_for_rendering(); webview.webview.paint(); self.rendering_context.present(); webview.delegate.mark_frame_presented();