Bug 1021085 - Remove unnecessary transform stored on the paint data. r=Cwiiis, a=2.0+
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 23 Jun 2014 08:42:48 -0400
changeset 207273 0d72bf6d5c3cc4248d3a1fb3eeba301bf457956f
parent 207272 63f56d26a625498d1d74e4a684217173827b55e5
child 207274 1fede0b2aa9869c0996fb64cb821ebb14fd805e1
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCwiiis, 2
Bug 1021085 - Remove unnecessary transform stored on the paint data. r=Cwiiis, a=2.0+
--- a/gfx/layers/client/ClientTiledThebesLayer.cpp
+++ b/gfx/layers/client/ClientTiledThebesLayer.cpp
@@ -145,34 +145,32 @@ ClientTiledThebesLayer::BeginPaint()
   TILING_PRLOG(("TILING 0x%p: Found scrollAncestor 0x%p and displayPortAncestor 0x%p\n", this,
     scrollAncestor, displayPortAncestor));
   const FrameMetrics& scrollMetrics = scrollAncestor->GetFrameMetrics();
   const FrameMetrics& displayportMetrics = displayPortAncestor->GetFrameMetrics();
   // Calculate the transform required to convert ParentLayer space of our
   // display port ancestor to the Layer space of this layer.
-  gfx3DMatrix transformToDisplayPort =
-    GetTransformToAncestorsParentLayer(this, displayPortAncestor);
-  mPaintData.mTransformDisplayPortToLayer = transformToDisplayPort.Inverse();
+  gfx3DMatrix transformDisplayPortToLayer =
+    GetTransformToAncestorsParentLayer(this, displayPortAncestor).Inverse();
   // Note that below we use GetZoomToParent() in a number of places. Because this
   // code runs on the client side, the mTransformScale field of the FrameMetrics
   // will not have been set. This can result in incorrect values being returned
   // by GetZoomToParent() when we have CSS transforms set on some of these layers.
   // This code should be audited and updated as part of fixing bug 993525.
   // Compute the critical display port that applies to this layer in the
   // LayoutDevice space of this layer.
   ParentLayerRect criticalDisplayPort =
     (displayportMetrics.mCriticalDisplayPort * displayportMetrics.GetZoomToParent())
     + displayportMetrics.mCompositionBounds.TopLeft();
   mPaintData.mCriticalDisplayPort = RoundedOut(
-    ApplyParentLayerToLayerTransform(mPaintData.mTransformDisplayPortToLayer, criticalDisplayPort));
+    ApplyParentLayerToLayerTransform(transformDisplayPortToLayer, criticalDisplayPort));
   TILING_PRLOG_OBJ(("TILING 0x%p: Critical displayport %s\n", this, tmpstr.get()), mPaintData.mCriticalDisplayPort);
   // Store the resolution from the displayport ancestor layer. Because this is Gecko-side,
   // before any async transforms have occurred, we can use the zoom for this.
   mPaintData.mResolution = displayportMetrics.GetZoomToParent();
   TILING_PRLOG(("TILING 0x%p: Resolution %f\n", this, mPaintData.mResolution.scale));
   // Store the applicable composition bounds in this layer's Layer units.
--- a/gfx/layers/client/TiledContentClient.h
+++ b/gfx/layers/client/TiledContentClient.h
@@ -250,23 +250,16 @@ struct BasicTiledLayerPaintData {
    * The scroll offset of the content from the nearest ancestor layer that
    * represents scrollable content with a display port set, for the last
    * layer update transaction.
   ParentLayerPoint mLastScrollOffset;
-   * The transform matrix to go from the display port layer's ParentLayer
-   * units to this layer's Layer units. The "display port layer" is
-   * the closest ancestor layer with a displayport.
-   */
-  gfx3DMatrix mTransformDisplayPortToLayer;
-  /*
    * The transform matrix to go from this layer's Layer units to
    * the scroll ancestor's ParentLayer units. The "scroll ancestor" is
    * the closest ancestor layer which scrolls, and is used to obtain
    * the composition bounds that are relevant for this layer.
   gfx3DMatrix mTransformToCompBounds;