Bug 1223736 - Part 1: Set correct effective transform on mask layers. r=thinker
☠☠ backed out by 57f5e012ebf3 ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 18 Mar 2016 18:45:13 +1300
changeset 289410 5813dbb50356f6fe9e7cd59c227d45d37fd87d8e
parent 289409 a4e010070e050586bdacf851478456cf140dd326
child 289411 1982db677df6bbcd00dd4bd06ce906050f2576c6
push id30102
push userryanvm@gmail.com
push dateSat, 19 Mar 2016 15:23:17 +0000
treeherdermozilla-central@720fb3d55e28 [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