You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebAssembly WebGPU repaints the whole window every frame (no partial repaint) #25713
On WebAssembly with the WebGPU backend, every frame repaints the whole window, even when a single small element changed. The browser WebGPU context (WebGpuBrowserGraphicsContext) never reports PreservesContents, so the compositor can't use partial repaint (damage regions) there. Desktop WebGPU (WebGpuSwapChainContext) and the other hosts do.
The cost scales with the window size. On a software WebGPU adapter (Chrome with SwiftShader, as in CI's WebAssembly WebGPU lane), frames are slow enough that animation and scroll tests fail on timing. The lane has failed 2 to 8 of its 12 shards on every master build since it was added. Some examples:
Given_InteractionTracker.When_MouseWheel: too few intermediate frames during inertia.
Given_ScrollViewer.When_Wheel_Notches_Then_Settles_Shortly_After_The_Last: settled 1064 ms after the last notch, against a 360 ms limit.
Like the other WebGPU contexts, the browser context keeps last frame's pixels: it renders into an offscreen texture that is recreated only on resize, then blits that texture to the canvas. So it should report PreservesContents, and the compositor should repaint only the damaged region.
How to reproduce it (as minimally and precisely as possible) 🔬
Run CI's WebAssembly WebGPU lane, or the same setup locally:
Chrome with --enable-unsafe-webgpu --enable-features=Vulkan --use-webgpu-adapter=swiftshader;
a 1280×800 window under Xvfb;
the SamplesApp published for net11.0-browserwasm, with env=UNO_WEBGPU=1.
Then run the 14 tests the lane failed on master. 10 of them fail. The same 14 tests pass with the Skia backend in the same browser. With a quarter of the pixels (640×400), only 3 fail, which shows the cost is per pixel.
Workaround 🛠️
None in the app. A smaller window reduces the cost.
Affected platforms 📱💻🖥️
WebAssembly
Uno.Sdk version (and other relevant versions) 📦
master (Uno 7.0 dev)
IDE version 🧑💻
No response
Anything else we need to know? 💬
Hardware WebGPU in a real browser is affected too, just less visibly: the same full-window repaint runs on every frame.
Activity
fix(webgpu): Let the browser swapchain keep last frame's pixels