Repository navigation
fix(skia): Outset damage clip to cover AA fringe at fractional scales (backport #24031) - #24248
Merged
kazo0 merged 2 commits intoAug 28, 2026
Merged
Conversation
The per-present damage clip is intentionally non-antialiased so boundary pixels aren't blended against the retained surface, but that makes it include only device pixels whose centers lie inside the damage region, while AA rendering also writes pixels whose centers lie outside the geometry. The record-side 2px outset protects content edges, yet wherever the damage region is intersected with an ancestor clip its edge coincides exactly with an AA-rendered clip edge with no margin. At fractional rasterization scales (e.g. 150%) those edges land between device pixels, so the written AA fringe is permanently excluded from replay and accumulates as stale stripe artifacts under translate animations (popup + clipped track + static overlay). Outset the present clip by one device pixel (stroke-and-union, still non-AA). The replayed picture is the full frame, so over-covering is always correct. Runtime-validated A/B on a 150%-scale GPU machine: stripes reproduce with the raw clip and disappear with the outset applied. Co-Authored-By: Claude Fable 5 <[email protected]> (cherry picked from commit dbdf7b0)
Co-Authored-By: Claude Fable 5 <[email protected]> (cherry picked from commit eedb497)
1 of 4 tasks
ajpinedam
approved these changes
Aug 27, 2026
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24248/wasm-skia-net9/index.html |
Contributor
|
The build 230680 did not find any UI Test snapshots differences. |
Contributor
Author
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes unoplatform/kahua-private#534
PR Type:
🐞 Bugfix
What changed? 🚀
Current behavior: at fractional rasterization scales (e.g. 150% display scale) on GPU-backed Skia hosts, a translate-animated element inside a
Popup— with an ancestor clip cutting its damage region and static content drawn above it — leaves stale ≤1px stripe artifacts across the vacated area (see the linked issue: TabBarSlideselection indicator).Root cause: the per-present damage clip in
CompositionTarget.Drawis intentionally non-antialiased (so boundary pixels aren't blended against the retained surface), which means it includes only device pixels whose centers lie inside the damage region. Rendering, however, is antialiased and also writes fringe pixels whose centers lie outside the drawn geometry. The record side already outsets content edges by 2px (OutsetForAntialiasing), but whereverTryGetPaintDamageRegionintersects the damage region with an ancestor clip, the damage edge coincides exactly with an AA-rendered clip edge — zero margin. At integer scales those edges are device-pixel-aligned so no fringe exists (the "regions are pixel-snapped" premise of the original non-AA choice); at fractional scales they land between device pixels, and the written AA fringe is permanently excluded from every replay, accumulating as stripes.This PR: outsets the present-time damage clip by exactly one device pixel (stroke-and-union,
OutsetDamageForPresent). The clip stays non-antialiased, preserving the original rationale; the replayed picture is always the full frame, so over-covering is correct by construction.Validation: runtime A/B on a 150%-scale machine with a real GPU (Win32
GlRenderer): stripes reproduce with the raw clip and disappear with the outset applied, in the same binary with the outset toggled.PR Checklist ✅
DirtyRectangles_*manual samples cover the damage-region pipeline)Screenshots Compare Test Runresults.🤖 Generated with Claude Code
This is an automatic backport of pull request #24031 done by [Mergify](https://mergify.com).