Bug 1223736 - Part 1: Set correct effective transform on mask layers. r=thinker
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 22 Mar 2016 09:06:58 +1300
changeset 289655 00e1045a4e146d67d02eea51057061b1bdd363df
parent 289654 521e461d2eefbba78037cbec0aa6db89ad16c331
child 289656 cc75c8546991b57aec6f6f4dd18e70554c229ebb
push id73940
push usermwoodrow@mozilla.com
push dateMon, 21 Mar 2016 20:12:04 +0000
treeherdermozilla-inbound@e7ee750067da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersthinker
bugs1223736
milestone48.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 1223736 - Part 1: Set correct effective transform on mask layers. r=thinker
gfx/layers/Layers.cpp
layout/reftests/layers/mask-layer-transform-ref.html
layout/reftests/layers/mask-layer-transform.html
layout/reftests/layers/reftest.list
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1461,21 +1461,17 @@ ContainerLayer::DefaultComputeEffectiveT
   }
   mUseIntermediateSurface = useIntermediateSurface && !GetLocalVisibleRegion().IsEmpty();
   if (useIntermediateSurface) {
     ComputeEffectiveTransformsForChildren(Matrix4x4::From2D(residual));
   } else {
     ComputeEffectiveTransformsForChildren(idealTransform);
   }
 
-  if (idealTransform.CanDraw2D()) {
-    ComputeEffectiveTransformForMaskLayers(aTransformToSurface);
-  } else {
-    ComputeEffectiveTransformForMaskLayers(Matrix4x4());
-  }
+  ComputeEffectiveTransformForMaskLayers(aTransformToSurface);
 }
 
 void
 ContainerLayer::DefaultComputeSupportsComponentAlphaChildren(bool* aNeedsSurfaceCopy)
 {
   if (!(GetContentFlags() & Layer::CONTENT_COMPONENT_ALPHA_DESCENDANT) ||
       !Manager()->AreComponentAlphaLayersEnabled()) {
     mSupportsComponentAlphaChildren = false;
new file mode 100644
--- /dev/null
+++ b/layout/reftests/layers/mask-layer-transform-ref.html
@@ -0,0 +1,8 @@
+<html>
+<body>
+    <div style="position:relative; left: 400px; width: 200px; height: 200px; overflow:hidden; border-radius: 20px;">
+        <div style="width:200px; height:200px; background-color:red; transform: perspective(100px) rotateY(10deg)"></div>
+    </div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/layers/mask-layer-transform.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+    <div style="width:200px; height: 200px; transform: translate(400px);">
+        <div style="width: 200px; height: 200px; overflow:hidden; border-radius: 20px;">
+            <div style="width:200px; height:200px; background-color:red; transform: perspective(100px) rotateY(10deg)"></div>
+        </div>
+  </div>
+</body>
+</html>
+
--- a/layout/reftests/layers/reftest.list
+++ b/layout/reftests/layers/reftest.list
@@ -14,8 +14,9 @@ skip != pull-background-animated-positio
 skip != pull-background-animated-position-5.html about:blank # Fails because ownLayer bounds don't anticipate changes of animated contents, but doesn't fail with event regions
 skip-if(!asyncPan) != pull-background-displayport-1.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-2.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 skip-if(!asyncPan) != pull-background-displayport-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 skip-if(!asyncPan) != pull-background-displayport-5.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-6.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 fuzzy(2,30150) == opacity-blending.html opacity-blending-ref.html
+fuzzy(1,5) == mask-layer-transform.html mask-layer-transform-ref.html