Bug 1165536. Don't include resolution compensation when adjusting the cliprect of ancestors of scrollbars. r=botond
authorTimothy Nikkel <tnikkel@gmail.com>
Sun, 17 May 2015 02:00:10 -0500
changeset 244203 c08fea2b1d59a7c41d014b582f9e86dcc8f51d6a
parent 244202 1772c002260342438b6c69d732b75e411439c73a
child 244208 35918b0441b4ea614185fe2df5e8de4db9fb28d9
push id28769
push userphilringnalda@gmail.com
push dateSun, 17 May 2015 16:04:21 +0000
treeherdermozilla-central@c08fea2b1d59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1165536
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1165536. Don't include resolution compensation when adjusting the cliprect of ancestors of scrollbars. r=botond We are trying to adjust for the async transform that gets applied to the scrollable container layer by applying a transform to the scrollbar layer. That means we also need to adjust our clip rect. The resolution compensation is not done for this reason (compensating for a transform on an ancestor layer), hence we don't need to adjust the clip rect for the resolution compensation.
gfx/layers/composite/AsyncCompositionManager.cpp
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -826,27 +826,28 @@ ApplyAsyncTransformToScrollbarForContent
   // regular transform, we need to make sure to unapply the async transform in
   // the same coordinate space. This requires applying the content transform
   // and then unapplying it after unapplying the async transform.
   if (aScrollbarIsDescendant) {
     Matrix4x4 asyncUntransform = (asyncTransform * apzc->GetOverscrollTransform()).Inverse();
     Matrix4x4 contentTransform = aContent.GetTransform();
     Matrix4x4 contentUntransform = contentTransform.Inverse();
 
-    compensation = compensation
-                 * contentTransform
-                 * asyncUntransform
-                 * contentUntransform;
+    Matrix4x4 asyncCompensation = contentTransform
+                                * asyncUntransform
+                                * contentUntransform;
+
+    compensation = compensation * asyncCompensation;
 
     // We also need to make a corresponding change on the clip rect of all the
     // layers on the ancestor chain from the scrollbar layer up to but not
     // including the layer with the async transform. Otherwise the scrollbar
     // shifts but gets clipped and so appears to flicker.
     for (Layer* ancestor = aScrollbar; ancestor != aContent.GetLayer(); ancestor = ancestor->GetParent()) {
-      TransformClipRect(ancestor, compensation);
+      TransformClipRect(ancestor, asyncCompensation);
     }
   }
   transform = transform * compensation;
 
   SetShadowTransform(aScrollbar, transform);
 }
 
 static LayerMetricsWrapper