Closed Bug 2052391 Opened 15 days ago Closed 12 days ago

Align tile-invalidation quantize with the rasterizer's pixel rounding

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(1 file)

No description provided.
Summary: Fix tile invalidation for subpixel offsets → Align tile-invalidation quantize with the rasterizer's pixel rounding
Blocks: 2050692

The picture-cache invalidation stores prim corners quantized to 1/4px via
round(v * 4). Those buckets are centered on the .5 boundary, which is exactly
where the rasterizer's whole-pixel round() flips device pixels. So two corners
that render to different device pixels (e.g. 20.4 -> 20 and 20.5 -> 21) can share
one invalidation key, and a tile is not re-rasterized when it should be, leaving
stale content. This was masked while prims were device-snapped (integer corners
quantize unambiguously); it surfaces once prims carry sub-pixel positions.

Truncate toward zero instead. This places the 1/4px bucket boundaries on every
half-integer with the same sign-aware tie-ownership as round() (half away from
zero), so a quant key uniquely determines the rendered device pixel for both
positive and negative coordinates, while keeping the 1/4px tolerance for
anti-aliased content. Verified: a full sweep over [-300, 300] including exact
half-integers has zero keys mapping to two device pixels (600 with the old
round).

Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2d5d6f15f148 https://hg.mozilla.org/integration/autoland/rev/20aa7c3784ad Align tile-invalidation quantize with the rasterizer's pixel rounding r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c26d2b38a389 https://hg.mozilla.org/integration/autoland/rev/c8d58387f362 Revert "Bug 2052391 - Align tile-invalidation quantize with the rasterizer's pixel rounding r=gfx-reviewers,lsalzman" for causing wr failures @ offset-rotate-005.html

Backed out for causing wr failures

Status: RESOLVED → REOPENED
Flags: needinfo?(mozilla)
Resolution: FIXED → ---
Target Milestone: 154 Branch → ---

(In reply to amarc from comment #5)

Backed out for causing wr failures

Hi, @Glenn, it also caused a permanent failure on Beta simulations

Confirmed that the first failure is an extra 1 pixel fuzziness, so updated test annotation for that. The beta failure was not previously fuzzy, but I was able to reproduce the exact same failure on my local machine on main/origin and then confirm it wasn't affected by this patch - so I've added fuzziness annotation for this.

Flags: needinfo?(mozilla)
Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0e084350ec08 https://hg.mozilla.org/integration/autoland/rev/2795d316fad1 Align tile-invalidation quantize with the rasterizer's pixel rounding r=gfx-reviewers,lsalzman
Status: REOPENED → RESOLVED
Closed: 15 days ago12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: