Bug 1360952 - Apply layer's clip to get correct opaque region of 3D context layer, r=mattwoodrow draft
authorpeter chang <pchang@mozilla.com>
Tue, 23 May 2017 17:11:25 +0800
changeset 582872 1e2284d7e0913f829b1048529f659e1a864aec73
parent 579118 41958333867b0f537271dbd4cb4ba9e8a67a85a8
child 629898 98ede480ba862374ad764bf4f4c4cadf69dc5f0f
push id60222
push userbmo:howareyou322@gmail.com
push dateTue, 23 May 2017 09:27:51 +0000
reviewersmattwoodrow
bugs1360952
milestone55.0a1
Bug 1360952 - Apply layer's clip to get correct opaque region of 3D context layer, r=mattwoodrow MozReview-Commit-ID: 8hwZ38QGLmv
gfx/layers/composite/LayerManagerComposite.cpp
--- 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;