Bug 979973 - Fix displayport tile-alignment immediately after zooming. r=botond

Resolution and cumulative resolution on FrameMetrics are incorrect when the
zoom level is about to change. Make sure to use the zoom rather than these
values when aligning the displayport to tile boundaries in APZCCallbackHelper.
This commit is contained in:
Chris Lord 2014-03-06 23:39:39 +00:00
parent 4d39320987
commit 673d3400b4

View File

@ -73,9 +73,12 @@ MaybeAlignAndClampDisplayPort(mozilla::layers::FrameMetrics& aFrameMetrics,
// Expand the display port to the next tile boundaries, if tiled thebes layers
// are enabled.
if (gfxPrefs::LayersTilesEnabled()) {
// We don't use LayersPixelsPerCSSPixel() here as mCumulativeResolution on
// this FrameMetrics may be incorrect (and is about to be reset by mZoom).
displayPort =
ExpandDisplayPortToTileBoundaries(displayPort + aActualScrollOffset,
aFrameMetrics.LayersPixelsPerCSSPixel())
aFrameMetrics.mZoom *
ScreenToLayerScale(1.0))
- aActualScrollOffset;
}