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

This commit is contained in:
Benoit Girard 2015-02-27 14:17:35 -05:00
parent bf924fc6dd
commit d2e314042f

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);
}