Skip to content

fix(skia): Outset damage clip to cover AA fringe at fractional scales (backport #24031) - #24248

Merged
kazo0 merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-24031
Aug 28, 2026
Merged

kazo0 merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-24031

Conversation

@mergify

@mergify mergify Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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: TabBar Slide selection indicator).

Root cause: the per-present damage clip in CompositionTarget.Draw is 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 wherever TryGetPaintDamageRegion intersects 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 ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable) — not applicable: the repro requires a real GPU at fractional display scale, which CI test environments don't provide; validated manually as described above (existing DirtyRectangles_* manual samples cover the damage-region pipeline)
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features) — not applicable, internal rendering fix
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes

🤖 Generated with Claude Code


This is an automatic backport of pull request #24031 done by [Mergify](https://mergify.com).

ramezgerges and others added 2 commits August 27, 2026 19:04
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)
@github-actions github-actions Bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Aug 27, 2026
@kazo0

kazo0 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 230680 did not find any UI Test snapshots differences.

@mergify

mergify Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@kazo0
kazo0 merged commit 18ea8ad into release/stable/6.7 Aug 28, 2026
48 checks passed
@kazo0
kazo0 deleted the mergify/bp/release/stable/6.7/pr-24031 branch August 28, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skia ✏️ Categorizes an issue or PR as relevant to Skia

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants