Closed Bug 1654353 Opened 6 years ago Closed 6 years ago

Avoid creating unnecessary temporary surfaces due to floating point inaccuracy

Categories

(Core :: Graphics: Layers, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

With apz.allow_zooming=true on desktop, a talos try run was showing some regressions on tp5o_scroll won Linux. I was able to reproduce part of that regression locally and tracked it down temporary surfaces getting created in the layer tree due to floating point inaccuracy. Specifically there was a 74 pixel translation for the content process reflayer, but on this line that was often coming out as 73.9999 or 74.0001. Nudging that to integers fixed the problem locally and cut the regression on subsequent try pushes in half (dunno where the other half is coming from...)

This avoids creating temporary surfaces in cases where we get a transform
matrix that's not axis-aligned integers but only because of floating point
inaccuracy.

(This is a spinoff from https://bugzilla.mozilla.org/show_bug.cgi?id=1643223#c2 and the following comment).

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/646a1a717d2b Nudge the transform matrix to integers before checking for integer axis alignment. r=mattwoodrow
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

Turns out this didn't fix all the cases. I filed bug 1655083 to fix the remaining ones.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: