Bug 1225125: If all drawing is just clipped out anyway, just push a regular group, blending mode won't matter. r=jrmuizel

This commit is contained in:
Bas Schouten 2015-11-17 16:27:17 +01:00
parent bf64ea1e0c
commit 5a5232dc3d

View File

@ -111,16 +111,18 @@ BasicLayerManager::PushGroupForLayer(gfxContext* aContext, Layer* aLayer, const
IntRect surfRect;
ToRect(rect).ToIntRect(&surfRect);
RefPtr<DrawTarget> dt = aContext->GetDrawTarget()->CreateSimilarDrawTarget(surfRect.Size(), SurfaceFormat::B8G8R8A8);
if (!surfRect.IsEmpty()) {
RefPtr<DrawTarget> dt = aContext->GetDrawTarget()->CreateSimilarDrawTarget(surfRect.Size(), SurfaceFormat::B8G8R8A8);
RefPtr<gfxContext> ctx = new gfxContext(dt, ToRect(rect).TopLeft());
ctx->SetMatrix(oldMat);
RefPtr<gfxContext> ctx = new gfxContext(dt, ToRect(rect).TopLeft());
ctx->SetMatrix(oldMat);
group.mGroupOffset = surfRect.TopLeft();
group.mGroupTarget = ctx;
group.mGroupOffset = surfRect.TopLeft();
group.mGroupTarget = ctx;
group.mMaskSurface = GetMaskForLayer(aLayer, &group.mMaskTransform);
return group;
group.mMaskSurface = GetMaskForLayer(aLayer, &group.mMaskTransform);
return group;
}
}
Matrix maskTransform;