Closed Bug 1914673 Opened 6 months ago Closed 6 months ago

WebRender update/scissor rects sometimes exceed the valid rects.

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: bradwerth, Assigned: bradwerth)

References

Details

Attachments

(1 file)

As evidenced by the release assert in Bug 1817691, WebRender sometimes sends an update rect that is outside the bounds of a layer's valid rect. Logging indicates that these update rects are one pixel too large, indicating there's a rounding error somewhere in WR. WR attempts to ensure this in take_context, but clamps rects before transforming and rounding them, potentially leading this problem.

This is probably harmless, but platforms like the macOS layer manager might try to do optimization based on the assumption that the update rect is contained within the valid rect.

This is an extra-double-sure clipping of the scissor rect to the valid
rect. This shouldn't matter since the dirty rect is clipped before the
creation of either of the other two rects, but will ensure that rounding
issues from the application of the transform in get_surface_rect won't
leave us with an out-of-bounds scissor rect.

See Also: → 1817691
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ca516749b37 Ensure WebRender provides update rects within the bounds of valid rects. r=gw
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: