Bug 1642308 - Fix fract offset calculations for picture cache tile invalidation. r=gw
Bug 1642308 - Fix fract offset calculations for picture cache tile invalidation. 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.

Differential Revision: https://phabricator.services.mozilla.com/D91156

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/af9de211274748a054c9c2b25ff709d819f39035

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender