Bug 1112830 - Changed mCumulativeResolution of FrameMetrics.h to private and all correspondings files using this variable using getters and setters;r=kats

This commit is contained in:
Prabhjyot Singh Sodhi
2014-12-18 19:33:18 -05:00
parent 483b42f3ca
commit cd58e9ca1d
9 changed files with 37 additions and 28 deletions

View File

@@ -636,7 +636,7 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer)
// doesn't have the necessary transform to display correctly. We use the
// bottom-most scrollable metrics because that should have the most accurate
// cumulative resolution for aLayer.
LayoutDeviceToLayerScale resolution = bottom.mCumulativeResolution;
LayoutDeviceToLayerScale resolution = bottom.GetCumulativeResolution();
oldTransform.PreScale(resolution.scale, resolution.scale, 1);
// For the purpose of aligning fixed and sticky layers, we disregard
@@ -871,7 +871,7 @@ AsyncCompositionManager::TransformScrollableLayer(Layer* aLayer)
// appears to be that metrics.mZoom is poorly initialized in some scenarios. In these scenarios,
// however, we can assume there is no async zooming in progress and so the following statement
// works fine.
CSSToParentLayerScale userZoom(metrics.GetDevPixelsPerCSSPixel() * metrics.mCumulativeResolution * LayerToParentLayerScale(1));
CSSToParentLayerScale userZoom(metrics.GetDevPixelsPerCSSPixel() * metrics.GetCumulativeResolution() * LayerToParentLayerScale(1));
ParentLayerPoint userScroll = metrics.GetScrollOffset() * userZoom;
SyncViewportInfo(displayPort, geckoZoom, mLayersUpdated,
userScroll, userZoom, fixedLayerMargins,