Seams between adjacent transformed layers

#401515597 Filed 2025-03-04 New

Reproducer

Two independently composited 100 x 100 images share an edge over a yellow backdrop. At non-integral browser zoom, the shared anti-aliased edge can expose a yellow seam.

Set browser zoom to 80%, 90%, 110%, or 125%, then move the phase control. The expected result is one continuous blue rectangle.

0.60px
live browser rendering; yellow at the image boundary is the failure
Expected continuous blue rectangle over yellow
Affected shared edge highlighted in magenta
Open standalone sampler

Cause

Each image edge is blended separately with SrcOver. Complementary edge coverages therefore apply the backdrop twice. Accumulating the non-overlapping images on transparent and compositing once preserves full coverage at the shared edge.

The fix lands in Viz (SkiaRenderer and SoftwareRenderer) behind the AccumulateAdjacentAAQuadCoverage feature flag: runs of adjacent, non-overlapping quads that share a fractional anti-aliased edge are drawn into a transparent layer with additive coverage and composited once.

Before / after

Captures from the same patched build at device scale factor 1.25 (SkiaRenderer via SwiftShader). "Before" runs with --disable-features=AccumulateAdjacentAAQuadCoverage, which is equivalent to an unpatched build; "after" is the default. Crops are 4x nearest-neighbor around the shared edge.

Case 1: adjacent composited image layers (this issue's repro)

before backdrop shows through the shared edge: rgb(48,48,207)
Before: vertical yellow-tinted seam between two blue image layers
after continuous rgb(0,0,255)
After: continuous blue, no seam

Two independently composited 100x100 images over yellow, translated to a fractional device position.

Case 2: adjacent solid color layers

before seam at the shared edge
Before: seam between two solid color layers
after continuous color
After: continuous color, no seam

Solid color layers skip rasterization and become SolidColorDrawQuads, so the raster-time seam mitigation never applied to them. Matches the open "adjacent solid color layers" rows in the issue 40084005 case sheet.

Case 3: map tiles (leaflet), fractional translation

before light seam line across dark tiles
Before: light seam line between dark map tiles
after tiles meet without a seam
After: map tiles meet without a seam

Live capture of the leaflet tile case from the issue 40084005 case sheet; the same pattern as freemap.sk and Google Maps tile seams. Nine seam lines in the viewport are repaired; the control cases from the sheet (no seam expected) are byte-identical before and after.