Skip to content

WebAssembly WebGPU repaints the whole window every frame (no partial repaint) #25713

Closed

Description

@ramezgerges

Current behavior 🐛

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.
  • ScrollPresenterTests.InterruptOffsetsChangeWithOffsetsChange: WaitForEvent timed out.

Expected behavior 🎯

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

  1. added
    triage/untriaged
    on Oct 26, 2026
  2. added a commit that references this issue on Oct 27, 2026
    650267a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions