Backed out changeset b3eaebda3d9d (bug 1318266)

This commit is contained in:
Iris Hsiao 2016-12-19 16:17:22 +08:00
parent 904ee878ab
commit e566e8864d
3 changed files with 7 additions and 5 deletions

View File

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

View File

@ -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) {

View File

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