Repository navigation
Description
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
- Create a new Uno app with
Uno.Sdk6.7.30 (it resolvesUno.WinUI6.7.135),net10.0-desktop,SkiaRenderer, on Windows 11. Program.cs:UnoPlatformHostBuilder.Create().App(() => new App()).UseWin32().Build().Run();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();- Run it. The rectangle is saturated red instead of 50% red over Mica, and does not disappear when collapsed.
- 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). masteris not affected: the Win32 OpenGL path with this blit no longer exists there (Win32GraphicsContextcopies 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:
- servicing/6.8:
uno/src/Uno.UI.Runtime.Skia.Win32/Rendering/Win32WindowWrapper.Rendering.OpenGl.cs
Lines 225 to 231 in 43816fa
void IRenderer.CopyPixels(int width, int height) { _pacer?.OnFrameStart(); if (_layer is { } layer && _swapchainSurface is { } swapchain) { layer.Draw(swapchain.Canvas, 0, 0, null); - release/stable/6.7:
uno/src/Uno.UI.Runtime.Skia.Win32/Rendering/Win32WindowWrapper.Rendering.OpenGl.cs
Lines 225 to 231 in 034fe60
void IRenderer.CopyPixels(int width, int height) { _pacer?.OnFrameStart(); if (_layer is { } layer && _swapchainSurface is { } swapchain) { layer.Draw(swapchain.Canvas, 0, 0, null);
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
MartinZikmund commentedon Oct 14, 2026
Closing as a duplicate of #24926. Any details that were only here have been copied over to #24926.
Jen-Uno commentedon Oct 28, 2026
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.