From dc1ab20b0546c154ee0ac486715ba8e23b14b14a Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 31 Jul 2026 09:18:18 +0200 Subject: [PATCH] :zap: Drain GPU work on partial render frames Partial frames only flushed the Backbuffer, so tile GPU commands queued until present_frame's flush_and_submit and stalled the browser on large files. Submit the context each partial frame without presenting Target or re-composing the tile atlas. --- render-wasm/src/render.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/render-wasm/src/render.rs b/render-wasm/src/render.rs index 7ff4423f7a..ebf43d5ebb 100644 --- a/render-wasm/src/render.rs +++ b/render-wasm/src/render.rs @@ -2376,9 +2376,12 @@ impl RenderState { panic!("FrameType::None"); } FrameType::Partial => { - // Partial frame: just flush GPU work. The display shows the last - // fully submitted frame; no need to copy or draw UI overlays here. - self.flush(); + // Drain tile GPU work (Current / tile atlas / cache) without + // presenting Target and without re-snapshotting the tile atlas — + // composition stays deferred to Full (`01fc3c3e7d`). A Backbuffer + // flush alone left commands queued until present_frame's + // flush_and_submit, which stalled the browser on large files. + crate::get_gpu_state().context.flush_and_submit(); } FrameType::Full => { // A full-quality frame is now complete. Rebuild the per-shape crop