Bug 539604. Part 12: Enable component alpha for containers that don't have an intermediate surface. r=bas,a=blocking
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 03 Jan 2011 15:04:59 +1300
changeset 59816 6bae7865092ae3dc803c5ed00effcfd2fc3f1579
parent 59815 95e3bf77d7d0de09f1058e697cc3e9f6c9adb942
child 59817 29867a7bccf2bbba1817d307656a4234abddae3d
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbas, blocking
bugs539604
milestone2.0b9pre
Bug 539604. Part 12: Enable component alpha for containers that don't have an intermediate surface. r=bas,a=blocking
gfx/layers/d3d9/ContainerLayerD3D9.cpp
--- a/gfx/layers/d3d9/ContainerLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ContainerLayerD3D9.cpp
@@ -235,16 +235,18 @@ ContainerLayerD3D9::RenderLayer()
     device()->GetVertexShaderConstantF(CBmProjection, &oldViewMatrix[0][0], 4);
     device()->SetVertexShaderConstantF(CBmProjection, &viewMatrix._11, 4);
   } else {
 #ifdef DEBUG
     PRBool is2d =
 #endif
     GetEffectiveTransform().Is2D(&contTransform);
     NS_ASSERTION(is2d, "Transform must be 2D");
+    mSupportsComponentAlphaChildren = (GetContentFlags() & CONTENT_OPAQUE) ||
+        (mParent && mParent->SupportsComponentAlphaChildren());
   }
 
   /*
    * Render this container's contents.
    */
   for (LayerD3D9* layerToRender = GetFirstChildD3D9();
        layerToRender != nsnull;
        layerToRender = GetNextSiblingD3D9(layerToRender)) {