Skip to content

Skia Win32: navigating away from a scrolled page leaves its pixels on screen (stale damage region) #25478

Closed

Description

@MartinZikmund

Current behavior 🐛

On Skia Desktop (Win32), navigating a Frame away from a page whose ScrollViewer has been scrolled leaves parts of the old page painted on screen. The leftovers sit at the old page's scrolled positions, wherever the new page paints nothing over them. In the repro below, the "Your postcards" heading and the top edges of three cards from the Home page stay visible on top of the Routes page. A window resize (full repaint) clears them.

Not specific to Mica: the same ghosts show up with no SystemBackdrop set. When first observed, navigating from the same page while it was not scrolled was clean (I did not re-check that in this run).

Related but not the same: #24926 is the 6.7 Win32 OpenGL blit issue under a SystemBackdrop, fixed on master. This one reproduces on 7.0 dev builds, where the per-frame damage logic has been rewritten (it no longer uses SKPath.Op, so #25001 does not apply either). It may be connected to the scroll damage work from #23986, which I have not confirmed.

Expected behavior 🎯

The removed page's area is repainted, so only the Routes page is visible. WinUI redraws the whole frame, so it has no stale pixels.

How to reproduce it (as minimally and precisely as possible) 🔬

I could not get a small standalone sample to trigger it (a Frame with a transparent ScrollViewer page under NavigationView with Mica, and entrance transitions, stays clean), so the trigger is not isolated yet. It reproduces reliably in this public app:

  1. Windows 11, clone https://github.com/MartinZikmund/Wayfarer and check out 01b9a11eec4d500a60ff72d94111c8a99b554793.
  2. The app carries its own workaround for this bug. In Wayfarer/Views/MainPage.xaml.cs, change #if HAS_UNO to #if false inside RepaintContentArea().
  3. dotnet run --project Wayfarer/Wayfarer.csproj -f net10.0-desktop -c Release.
  4. On the Home page, scroll down with the mouse wheel about 14 notches, until the "Your postcards" heading is visible near the top.
  5. Click "Routes" in the navigation pane.

Result: the Routes page is shown, but "Your postcards" and the top slivers of the three Home cards are still drawn over it (heading just under the "Routes" subtitle, card edges at the top of the tab row).

Run at 150% display scale, input driven with real mouse wheel and click events.

Variations checked (all with the workaround removed):

  • Uno.Sdk 7.0.0-dev.75 (Uno.WinUI 7.0.0-dev.2282): ghosts.
  • Same app with all Uno.WinUI packages overridden to 7.0.0-dev.2328 (published 2026-10-14 12:46 UTC): ghosts.
  • Removing the EntranceThemeTransition from HomePage.xaml: ghosts (different spots, so the transition is not the cause).
  • No SystemBackdrop (Mica line removed): ghosts.

Workaround 🛠️

Force a full repaint after navigating, for example by toggling the frame's background between null and a nearly transparent brush:

ContentFrame.Background = ContentFrame.Background is null
    ? new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(1, 0, 0, 0))
    : null;

Works on UWP/WinUI

Yes, WinUI redraws the whole frame. Not checked against native WinUI in this run.

Renderer 🎨

  • Skia

Affected platforms 📱💻🖥️

Desktop (Windows). Other heads not checked.

Uno.Sdk version (and other relevant versions) 📦

Uno.Sdk 7.0.0-dev.75 (Uno.WinUI 7.0.0-dev.2282), and Uno.WinUI 7.0.0-dev.2328 (the newest dev package at the time of testing, which was built from roughly the same commit as master 77e2e558c3d; I did not build the repro against master source). net10.0-desktop, Release, Windows 11 10.0.29683, 150% scale.

IDE version 🧑‍💻

Command line (dotnet SDK 10.0.401).

Anything else we need to know? 💬

Suspected area (not verified): when a removed page's subtree is cleared, ContainerVisual calls Visual.ContributeRemovalDamage, which damages each descendant's cached _lastRenderBounds. If those cached bounds (or the cached children pictures of an ancestor) do not match what was last painted after a scroll, the old scrolled positions are never damaged and keep their pixels.

Hint for narrowing it down: the missing damage is for the previous page's content only; the new page and the pane repaint fine.

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/challenging 🤯
    platform/win32 🪟
    on Oct 14, 2026
  2. removed
    triage/untriaged
    on Oct 29, 2026
  3. self-assigned this
    on Nov 2, 2026
  4. added 5 commits that reference this issue on Nov 2, 2026
    b295617
    01384b3
    84b7706
    782f39d
    3efde89
  5. khaskoul commented on Nov 14, 2026

    @khaskoul

    Verified fixed on Uno.Sdk 7.0.22 (Uno.WinUI 7.0.65) and 7.1.0-dev.18 (Uno.WinUI 7.1.0-dev.173) with the repro from the description.

    Environment: Windows 11 Pro (26200), .NET SDK 10.0.401, Skia desktop (Win32), net10.0-desktop Release, 150% scale.

    Wayfarer at 01b9a11, workaround in RepaintContentArea() disabled. Real mouse input: Home, 14 wheel notches until "Your postcards" is near the top, click Routes.

    • Uno.Sdk 7.0.0-dev.75 (control): ghosts in 2 of 4 tries ("Your postcards" under the Routes subtitle, card edges at the tab row), still there 8 s later.
    • Uno.Sdk 7.0.22: no ghosts in 6 of 6 tries, at 1 s and 8 s after navigating.
    • Uno.Sdk 7.1.0-dev.18: no ghosts in 6 of 6 tries, at 1 s and 8 s after navigating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/skia/composition ✏️difficulty/challenging 🤯kind/bugplatform/win32 🪟

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions