Bug 1281907 - Part 1 - Include zoom level compensation in clip transform passed to caller. r=botond a=jcristau
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 04 Apr 2018 20:18:25 +0300
changeset 463025 d6cfd5638b853ff747e276d816094b1128f80b54
parent 463024 1f65df949a50828a81d86de98219536394ac2caf
child 463026 8bf7d4cef4c3fd2048a56aae828cad0fbafc6ff3
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, jcristau
bugs1281907
milestone60.0
Bug 1281907 - Part 1 - Include zoom level compensation in clip transform passed to caller. r=botond a=jcristau
gfx/layers/composite/AsyncCompositionManager.cpp
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -1264,28 +1264,25 @@ AsyncCompositionManager::ComputeTransfor
   // and then unapplying it after unapplying the async transform.
   if (aScrollbarIsDescendant) {
     AsyncTransformComponentMatrix overscroll =
         aApzc->GetOverscrollTransform(AsyncPanZoomController::eForCompositing);
     Matrix4x4 asyncUntransform = (asyncTransform * overscroll).Inverse().ToUnknownMatrix();
     Matrix4x4 contentTransform = aScrollableContentTransform;
     Matrix4x4 contentUntransform = contentTransform.Inverse();
 
-    AsyncTransformComponentMatrix asyncCompensation =
-        ViewAs<AsyncTransformComponentMatrix>(
-            contentTransform
-          * asyncUntransform
-          * contentUntransform);
+    compensation *= ViewAs<AsyncTransformComponentMatrix>(
+                        contentTransform
+                      * asyncUntransform
+                      * contentUntransform);
 
-    compensation = compensation * asyncCompensation;
-
-    // Pass the async compensation out to the caller so that it can use it
+    // Pass the total compensation out to the caller so that it can use it
     // to transform clip transforms as needed.
     if (aOutClipTransform) {
-      *aOutClipTransform = asyncCompensation;
+      *aOutClipTransform = compensation;
     }
   }
   transform = transform * compensation;
 
   return transform;
 }
 
 static LayerMetricsWrapper