Bug 627393. Set correct alpha value for D3D10 ColorLayers. r=bas,a=blocking
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 25 Jan 2011 21:45:49 +1300
changeset 61258 dd3dcc6f3b1de0680bc050feea426288bbe263e7
parent 61257 17539a7e42757a207c8c348045c36d516f1dd76c
child 61259 4568082aec55e3d6798526563ba2294b3f7b0d2e
push id18279
push userrocallahan@mozilla.com
push dateTue, 25 Jan 2011 08:48:54 +0000
treeherdermozilla-central@4568082aec55 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas, blocking
bugs627393
milestone2.0b10pre
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 627393. Set correct alpha value for D3D10 ColorLayers. r=bas,a=blocking
gfx/layers/d3d10/ColorLayerD3D10.cpp
layout/reftests/bugs/627393-1.html
layout/reftests/bugs/reftest.list
--- a/gfx/layers/d3d10/ColorLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ColorLayerD3D10.cpp
@@ -59,17 +59,17 @@ ColorLayerD3D10::RenderLayer()
 {
   float color[4];
   // output color is premultiplied, so we need to adjust all channels.
   // mColor is not premultiplied.
   float opacity = GetEffectiveOpacity() * mColor.a;
   color[0] = (float)(mColor.r * opacity);
   color[1] = (float)(mColor.g * opacity);
   color[2] = (float)(mColor.b * opacity);
-  color[3] = (float)(mColor.a);
+  color[3] = opacity;
 
   const gfx3DMatrix& transform = GetEffectiveTransform();
   void* raw = &const_cast<gfx3DMatrix&>(transform)._11;
   effect()->GetVariableByName("mLayerTransform")->SetRawValue(raw, 0, 64);
   effect()->GetVariableByName("fLayerColor")->AsVector()->SetFloatVector(color);
 
   ID3D10EffectTechnique *technique;
   technique = effect()->GetTechniqueByName("RenderSolidColorLayer");
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/627393-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<body>
+<div id="d" style="background:black; width:300px; height:300px; opacity:0.5;"></div>
+<script>
+function doTest() {
+  document.getElementById('d').style.opacity = 0.001;
+  document.documentElement.removeAttribute("class");
+}
+window.addEventListener("MozReftestInvalidate", doTest, false);
+</script>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1568,8 +1568,9 @@ HTTP(..) != 615121-2.html 615121-2-notre
 == 617242-1.html 617242-1-ref.html
 != 618071.html 618071-notref.html
 == 619117-1.html 619117-1-ref.html
 == 621253-1.xhtml 621253-1-ref.xhtml
 HTTP(..) == 619511-1.html 619511-1-ref.html
 random-if(winWidget) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positioning discrepancy in rotated text (may depend on platform fonts)
 HTTP(..) == 621918-2.svg 621918-2-ref.svg # http(..) for filters.svg, used to mask antialiasing issues where glyphs touch
 == 625409-1.html 625409-1-ref.html
+== 627393-1.html about:blank