Skip to content

Win32 OpenGL renderer blends frames onto the stale back buffer under a SystemBackdrop (6.7/6.8) #25366

Closed as duplicate

Description

@MartinZikmund

Current behavior

On Skia desktop Win32 with the OpenGL renderer (the default on 6.7 and 6.8), content drawn over a SystemBackdrop (Mica/Acrylic) is blended onto the previous contents of the GL back buffer instead of replacing them. Semi-transparent content accumulates toward its fully opaque colour on every present, and content that is hidden or removed is never cleared.

Measured on Uno.WinUI 6.7.135 (see repro below): a 50% red rectangle on a window with MicaBackdrop, toggled Visible/Collapsed every 1.5 s, sampled from the screen every 150 ms:

Renderer Pixel at rectangle centre while visible While Collapsed
OpenGL (default) #F20202, then #F90101, #FC0000, #FE0000 (accumulating towards pure red) never reverts, stays red
Software (UseOpenGLOnWin32 = false) #930F0D (correct 50% red over Mica) #261E1A (Mica, correct)

Expected behavior

Each presented frame replaces the window contents: hiding an element reveals the backdrop again, and a 50% fill is always the same colour.

How to reproduce it

  1. Create a new Uno app with Uno.Sdk 6.7.30 (it resolves Uno.WinUI 6.7.135), net10.0-desktop, SkiaRenderer, on Windows 11.
  2. Program.cs: UnoPlatformHostBuilder.Create().App(() => new App()).UseWin32().Build().Run();
  3. App.OnLaunched:
var window = new Window { SystemBackdrop = new MicaBackdrop() };
var canvas = new Canvas { Width = 600, Height = 400 };
var rect = new Rectangle { Width = 200, Height = 200, Fill = new SolidColorBrush(Color.FromArgb(0x80, 255, 0, 0)) };
Canvas.SetLeft(rect, 100);
Canvas.SetTop(rect, 100);
canvas.Children.Add(rect);
window.Content = canvas;
window.Activate();

var timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(1500) };
timer.Tick += (_, _) => rect.Visibility = rect.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
timer.Start();
  1. Run it. The rectangle is saturated red instead of 50% red over Mica, and does not disappear when collapsed.
  2. Add Uno.UI.FeatureConfiguration.Rendering.UseOpenGLOnWin32 = false; before building the host and run again: the rectangle is translucent red and correctly disappears.

Workaround

Set FeatureConfiguration.Rendering.UseOpenGLOnWin32 = false to avoid the OpenGL path.

Works on UWP/WinUI

Yes, WinUI replaces the window surface on each frame. This is an Uno rendering bug rather than a parity question.

Environment

  • NuGet package version: Uno.WinUI 6.7.135 (Uno.Sdk 6.7.30), runtime-verified. The same code is present on servicing/6.8 (code inspection only).
  • master is not affected: the Win32 OpenGL path with this blit no longer exists there (Win32GraphicsContext copies its retained buffer with a framebuffer blit, no blending).
  • Affected platforms: Skia Desktop (Windows / Win32)
  • IDE: any. Windows 11, display scale 250%.

Anything else

Root cause (code inspection, identical on 6.7 and 6.8): the retained damage layer is drawn into the default framebuffer with the default (source-over) paint and nothing clears the back buffer. After SwapBuffers the back buffer holds an older frame (its content is undefined after a swap), so wherever the layer has alpha < 1, which is everything under a transparent root with a backdrop, the new frame blends onto stale pixels:

Suggested fix (servicing branches only): blit with SKBlendMode.Src, i.e. draw the layer with an SKPaint { BlendMode = SKBlendMode.Src } instead of null. This mirrors what #24546 does for the shared RetainedLayer.Present used by the other heads (macOS ghosting, #24495). That PR does not touch this Win32-specific copy of the blit, so it does not fix this issue.

It matters more with the SystemBackdrop backports (#24806 merged for 6.8, #24810 open for 6.7), which make the island root transparent under a rendered backdrop.

Activity

  1. added
    kind/bug
    triage/untriaged
    area/skia ✏️
    difficulty/starter 🚀
    platform/win32 🪟
    platform/desktop 🖥️
    on Oct 12, 2026
  2. MartinZikmund commented on Oct 14, 2026

    @MartinZikmund
    MemberAuthor

    Closing as a duplicate of #24926. Any details that were only here have been copied over to #24926.

  3. Jen-Uno commented on Oct 28, 2026

    @Jen-Uno
    Contributor

    This issue was closed as a duplicate, so there is nothing for QA to verify. Moving it from Ready for QA Review to Done on the Uno Team Backlog.

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

    area/skia ✏️difficulty/starter 🚀kind/bugplatform/desktop 🖥️platform/win32 🪟triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions