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();