-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
We tried to snap the picture layer and its raster cache's translation/offset to integer points for both performance and quality considerations. (See this line of code.)
However, we made a mistake: the fractional scale of SkMatrix will be applied to the picture's original offset. So if it has a non-zero original offset, say an integral x translation of 3, and the matrix has a fractional x scale of 1.5, they would result in final x translation of 4.5. Please check the unit test added in flutter/engine#17278 for a concrete example.
Since we've never run into performance or quality issues while we did this wrong, I felt that maybe we can just remove the integer snapping logic. It will also solve #41654. Note that we previously still drew the raster cache with integral offsets because we're using a rounded-out SkIRect to determine the location of the raster cache.