Bug 1200399 - Only send the RCD's metrics to Java-land for fennec-apz. r=rbarker

This commit is contained in:
Kartikaya Gupta 2015-09-02 16:31:06 -04:00
parent 2063b3e20f
commit b3f65055c0

View File

@ -647,19 +647,20 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer)
// bug 1036967 removed the (dead) call.
#if defined(MOZ_ANDROID_APZ)
if (mIsFirstPaint) {
CSSToLayerScale geckoZoom = metrics.LayersPixelsPerCSSPixel().ToScaleFactor();
LayerIntPoint scrollOffsetLayerPixels = RoundedToInt(metrics.GetScrollOffset() * geckoZoom);
mContentRect = metrics.GetScrollableRect();
SetFirstPaintViewport(scrollOffsetLayerPixels,
geckoZoom,
mContentRect);
if (metrics.IsRootContent()) {
if (mIsFirstPaint) {
CSSToLayerScale geckoZoom = metrics.LayersPixelsPerCSSPixel().ToScaleFactor();
LayerIntPoint scrollOffsetLayerPixels = RoundedToInt(metrics.GetScrollOffset() * geckoZoom);
mContentRect = metrics.GetScrollableRect();
SetFirstPaintViewport(scrollOffsetLayerPixels,
geckoZoom,
mContentRect);
}
mIsFirstPaint = false;
mLayersUpdated = false;
}
#endif
mIsFirstPaint = false;
mLayersUpdated = false;
// Transform the current local clip by this APZC's async transform. If we're
// using containerful scrolling, then the clip is not part of the scrolled
// frame and should not be transformed.