Bug 1332268 - Update EffectComponentAlpha texture coordinates when rendering split layers r=mattwoodrow
☠☠ backed out by ec7143bb25f0 ☠ ☠
authorMiko Mynttinen <mikokm@gmail.com>
Thu, 19 Jan 2017 14:24:43 +0100
changeset 375295 7d3e3c0a23c64491856e905c5a43550895f0dfe7
parent 375294 41914acaabea2783036faac564f4f22faacf2952
child 375296 dcf71e5e5fc30c714129e342959247681981c557
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1332268
milestone53.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 1332268 - Update EffectComponentAlpha texture coordinates when rendering split layers r=mattwoodrow MozReview-Commit-ID: HFgikDMPB7F
gfx/layers/Compositor.cpp
layout/reftests/transform-3d/component-alpha-1-ref.html
layout/reftests/transform-3d/component-alpha-1.html
layout/reftests/transform-3d/reftest.list
--- a/gfx/layers/Compositor.cpp
+++ b/gfx/layers/Compositor.cpp
@@ -337,17 +337,18 @@ Compositor::DrawPolygon(const gfx::Polyg
     texturedTriangle.width = aRect.width;
     texturedTriangle.height = aRect.height;
 
     // Since the texture was created for non-split geometry, we need to
     // update the texture coordinates to account for the split.
     const EffectTypes type = aEffectChain.mPrimaryEffect->mType;
 
     if (type == EffectTypes::RGB || type == EffectTypes::YCBCR ||
-        type == EffectTypes::NV12 || type == EffectTypes::RENDER_TARGET) {
+        type == EffectTypes::NV12 || type == EffectTypes::RENDER_TARGET ||
+        type == EffectTypes::COMPONENT_ALPHA) {
       TexturedEffect* texturedEffect =
         static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
 
       UpdateTextureCoordinates(texturedTriangle, aRect, intersection,
                                texturedEffect->mTextureCoords);
     }
 
     texturedTriangles.AppendElement(Move(texturedTriangle));
new file mode 100644
--- /dev/null
+++ b/layout/reftests/transform-3d/component-alpha-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<title>red box</title>
+<style>
+
+#wrapper {
+}
+
+#shape {
+  background-color: red;
+
+  width: 200px;
+  height: 200px;
+}
+</style>
+
+</head>
+<body>
+<div id="wrapper">
+  <div id="shape">foo</div>
+</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/transform-3d/component-alpha-1.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<title>red box</title>
+<style>
+
+#wrapper {
+  perspective: 0px;
+}
+
+#shape {
+  background-color: red;
+
+  width: 200px;
+  height: 200px;
+
+  transform: rotateX(0deg);
+}
+</style>
+
+</head>
+<body>
+<div id="wrapper">
+  <div id="shape">foo</div>
+</div>
+
+</body>
+</html>
--- a/layout/reftests/transform-3d/reftest.list
+++ b/layout/reftests/transform-3d/reftest.list
@@ -79,8 +79,9 @@ fuzzy(1,10000) == opacity-preserve3d-3.h
 fuzzy(1,10000) == opacity-preserve3d-4.html opacity-preserve3d-4-ref.html
 == snap-perspective-1.html snap-perspective-1-ref.html
 == mask-layer-1.html mask-layer-ref.html
 == mask-layer-2.html mask-layer-ref.html
 == mask-layer-3.html mask-layer-ref.html
 fails-if(winWidget&&layersGPUAccelerated) == split-intersect1.html split-intersect1-ref.html # Bug 1323791: implement DirectX compositor polygon support
 fuzzy(255,150) fails-if(winWidget&&layersGPUAccelerated) == split-intersect2.html split-intersect2-ref.html # Bug 1323791
 fuzzy(255,100) fails-if(winWidget&&layersGPUAccelerated) == split-non-ortho1.html split-non-ortho1-ref.html # Bug 1323791
+== component-alpha-1.html component-alpha-1-ref.html