mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Backed out changeset b3eaebda3d9d (bug 1318266)
This commit is contained in:
parent
904ee878ab
commit
e566e8864d
@ -7346,19 +7346,20 @@ nsDisplayMask::GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
bool nsDisplayMask::ShouldPaintOnMaskLayer(LayerManager* aManager)
|
||||
{
|
||||
if (!aManager->IsCompositingCheap() || aManager->IsWidgetLayerManager()) {
|
||||
if (!aManager->IsCompositingCheap()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsSVGUtils::MaskUsage maskUsage;
|
||||
nsSVGUtils::DetermineMaskUsage(mFrame, mHandleOpacity, maskUsage);
|
||||
|
||||
if (!maskUsage.shouldGenerateMaskLayer && !maskUsage.shouldApplyClipPath &&
|
||||
if (!maskUsage.shouldGenerateMaskLayer &&
|
||||
!maskUsage.shouldGenerateClipMaskLayer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (maskUsage.opacity != 1.0 || maskUsage.shouldApplyBasicShape) {
|
||||
if (maskUsage.opacity != 1.0 || maskUsage.shouldApplyClipPath ||
|
||||
maskUsage.shouldApplyBasicShape) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -272,6 +272,8 @@ nsSVGClipPathFrame::GetClipMask(gfxContext& aReferenceContext,
|
||||
SourceSurface* aExtraMask,
|
||||
const Matrix& aExtraMasksTransform)
|
||||
{
|
||||
MOZ_ASSERT(!IsTrivial(), "Caller needs to use ApplyClipPath");
|
||||
|
||||
IntPoint offset;
|
||||
RefPtr<DrawTarget> maskDT = CreateClipMask(aReferenceContext, offset);
|
||||
if (!maskDT) {
|
||||
|
@ -756,7 +756,6 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
||||
nsSVGUtils::DetermineMaskUsage(aParams.frame, aParams.handleOpacity,
|
||||
maskUsage);
|
||||
MOZ_ASSERT(maskUsage.shouldGenerateMaskLayer ||
|
||||
maskUsage.shouldApplyClipPath ||
|
||||
maskUsage.shouldGenerateClipMaskLayer);
|
||||
|
||||
nsIFrame* frame = aParams.frame;
|
||||
@ -810,7 +809,7 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
||||
}
|
||||
|
||||
// Paint clip-path onto ctx.
|
||||
if (maskUsage.shouldGenerateClipMaskLayer || maskUsage.shouldApplyClipPath) {
|
||||
if (maskUsage.shouldGenerateClipMaskLayer) {
|
||||
matSR.Restore();
|
||||
matSR.SetContext(&ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user