What would you like to be added? 💡
On Skia targets, RenderTargetBitmap.RenderAsync currently always rasterizes the visual tree in software (SKSurface.Create(info) + Compositor.IsSoftwareRenderer = true), even when the window itself renders through a hardware GRContext (OpenGL/Vulkan/Metal/WebGL).
RenderTargetBitmap should render through the window's GRContext when one is available, so the offscreen render is hardware-accelerated and matches the on-screen output, falling back to the raster path when the target renders in software.
Why is this needed? 🤔
- Performance: complex visual trees (effects, large surfaces) rasterize much faster on the GPU, and
UITestHelper.ScreenShot-style tooling built on RenderTargetBitmap benefits directly.
- Fidelity: GPU-rendered output matches what is actually presented on screen (e.g. effect brushes currently take software-only fallback paths during
RenderTargetBitmap rendering).
- Parity: WinUI's
RenderTargetBitmap is hardware-accelerated.
Renderer 🎨
For which platforms 📱💻🖥️
All platforms 🌍
Anything else we need to know? 💬
GPU rasterization can produce slightly different (equally valid) anti-aliasing than the software rasterizer, so RenderTargetBitmap output on GPU-rendered windows won't be bit-identical to the raster path — it will instead match what is presented on screen. Pixel-exact consumers (e.g. golden-image tests) should use perceptual or invariant-based comparisons.
What would you like to be added? 💡
On Skia targets,
RenderTargetBitmap.RenderAsynccurrently always rasterizes the visual tree in software (SKSurface.Create(info)+Compositor.IsSoftwareRenderer = true), even when the window itself renders through a hardwareGRContext(OpenGL/Vulkan/Metal/WebGL).RenderTargetBitmapshould render through the window'sGRContextwhen one is available, so the offscreen render is hardware-accelerated and matches the on-screen output, falling back to the raster path when the target renders in software.Why is this needed? 🤔
UITestHelper.ScreenShot-style tooling built onRenderTargetBitmapbenefits directly.RenderTargetBitmaprendering).RenderTargetBitmapis hardware-accelerated.Renderer 🎨
For which platforms 📱💻🖥️
All platforms 🌍
Anything else we need to know? 💬
GPU rasterization can produce slightly different (equally valid) anti-aliasing than the software rasterizer, so
RenderTargetBitmapoutput on GPU-rendered windows won't be bit-identical to the raster path — it will instead match what is presented on screen. Pixel-exact consumers (e.g. golden-image tests) should use perceptual or invariant-based comparisons.