Bug 1136766 - Don't allow more draw calls after culling. r=mattwoodrow

--HG--
extra : commitid : DKmD0O544RW
This commit is contained in:
Benoit Girard 2015-02-27 14:17:35 -05:00
parent 613a5755ba
commit 7f46e67522

View File

@ -226,7 +226,11 @@ LayerManagerComposite::ApplyOcclusionCulling(Layer* aLayer, nsIntRegion& aOpaque
LayerComposite *composite = aLayer->AsLayerComposite();
if (!localOpaque.IsEmpty()) {
nsIntRegion visible = composite->GetShadowVisibleRegion();
visible.Sub(visible, localOpaque);
nsIntRegion afterCulling;
afterCulling.Sub(visible, localOpaque);
// Intersect the original region with the bounds of the culled region so
// that we don't increase the region's complexity.
visible.AndWith(afterCulling.GetBounds());
composite->SetShadowVisibleRegion(visible);
}