forked from sailfishos/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1642308 - Fix some snapping related picture cache tile rect calcu…
…lations. r=gw Our fract offset for the tiles should be a simple mapping of the snapped device position back to picture space. If no snapping is required, then the position will be precisely the origin. When using this value to decide if the position has changed for glyph subpixel offset purposes, we must consider it in device space, since picture to device space can be effectively arbitrary. We update the stored fract offset at which a tile was rendered whenever we invalidate the whole tile, not just when we detect the fract offset has changed by a notable amount. This should reduce spurious invalidations since the tile was actually rendered at a different offset that we had recorded prior to this patch. Also, when evaluating the tile's valid rect, we cannot use the local valid rect. The device valid rect we use is the local mapped from picture space, but also snapped. Thus it makes far more sense to compare that which we used for drawing purposes which has the bonus of avoiding floating point errors. Differential Revision: https://phabricator.services.mozilla.com/D91156
- Loading branch information
Showing
2 changed files
with
58 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters