Bug 1360952 - Apply layer's clip to get correct opaque region of 3D context layer, r=mattwoodrow
MozReview-Commit-ID: 8hwZ38QGLmv
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -273,16 +273,19 @@ LayerManagerComposite::PostProcessLayers
"Only direct children of the establisher could have a clip");
for (Layer* child = aLayer->GetLastChild();
child;
child = child->GetPrevSibling()) {
PostProcessLayers(child, aOpaqueRegion, aVisibleRegion,
ancestorClipForChildren);
}
+ if (layerClip) {
+ aOpaqueRegion.AndWith(layerClip->ToUnknownRect());
+ }
return;
}
nsIntRegion localOpaque;
// Treat layers on the path to the root of the 3D rendering context as
// a giant layer if it is a leaf.
Matrix4x4 transform = GetAccTransformIn3DContext(aLayer);
Matrix transform2d;