From fd286a7d52427125a40892f5d2f396de5fda2c79 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Wed, 27 Jun 2012 08:06:32 +1200 Subject: [PATCH] Bug 768079; mask layers force an intermediate surface for their containers. r=roc --- gfx/layers/Layers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index af6cd909c95c..75a01ffef37d 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -467,8 +467,10 @@ ContainerLayer::DefaultComputeEffectiveTransforms(const gfx3DMatrix& aTransformT /* We can't (easily) forward our transform to children with a non-empty clip * rect since it would need to be adjusted for the transform. See * the calculations performed by CalculateScissorRect above. + * Nor for a child with a mask layer. */ - if (clipRect && !clipRect->IsEmpty() && !child->GetVisibleRegion().IsEmpty()) { + if ((clipRect && !clipRect->IsEmpty() && !child->GetVisibleRegion().IsEmpty()) || + child->GetMaskLayer()) { useIntermediateSurface = true; break; }