зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b3ad53915c5e (bug 1323912)
This commit is contained in:
Родитель
5757a6b248
Коммит
d569188dd7
|
@ -7351,9 +7351,11 @@ bool nsDisplayMask::ShouldPaintOnMaskLayer(LayerManager* aManager)
|
|||
nsSVGUtils::MaskUsage maskUsage;
|
||||
nsSVGUtils::DetermineMaskUsage(mFrame, mHandleOpacity, maskUsage);
|
||||
|
||||
// XXX Bug 1323912. nsSVGIntegrationUtils::PaintMask can not handle opacity
|
||||
// correctly. Turn it off before bug fixed.
|
||||
// XXX Temporary disable paint clip-path onto mask before figure out
|
||||
// performance regression(bug 1325550).
|
||||
if (maskUsage.shouldApplyClipPath) {
|
||||
if (maskUsage.opacity != 1.0 || maskUsage.shouldApplyClipPath) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -725,25 +725,6 @@ nsSVGIntegrationUtils::IsMaskResourceReady(nsIFrame* aFrame)
|
|||
return true;
|
||||
}
|
||||
|
||||
class AutoPopGroup
|
||||
{
|
||||
public:
|
||||
AutoPopGroup() : mContext(nullptr) { }
|
||||
|
||||
~AutoPopGroup() {
|
||||
if (mContext) {
|
||||
mContext->PopGroupAndBlend();
|
||||
}
|
||||
}
|
||||
|
||||
void SetContext(gfxContext* aContext) {
|
||||
mContext = aContext;
|
||||
}
|
||||
|
||||
private:
|
||||
gfxContext* mContext;
|
||||
};
|
||||
|
||||
DrawResult
|
||||
nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
||||
{
|
||||
|
@ -756,6 +737,10 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
|||
return DrawResult::SUCCESS;
|
||||
}
|
||||
|
||||
// XXX Bug 1323912.
|
||||
MOZ_ASSERT(maskUsage.opacity == 1.0,
|
||||
"nsSVGIntegrationUtils::PaintMask can not handle opacity now.");
|
||||
|
||||
gfxContext& ctx = aParams.ctx;
|
||||
nsIFrame* firstFrame =
|
||||
nsLayoutUtils::FirstContinuationOrIBSplitSibling(frame);
|
||||
|
@ -777,15 +762,6 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
|||
SurfaceFormat::A8);
|
||||
}
|
||||
|
||||
nsTArray<nsSVGMaskFrame *> maskFrames = effectProperties.GetMaskFrames();
|
||||
AutoPopGroup autoPop;
|
||||
bool shouldPushOpacity = (maskUsage.opacity != 1.0) &&
|
||||
(maskFrames.Length() != 1);
|
||||
if (shouldPushOpacity) {
|
||||
ctx.PushGroupForBlendBack(gfxContentType::COLOR_ALPHA, maskUsage.opacity);
|
||||
autoPop.SetContext(&ctx);
|
||||
}
|
||||
|
||||
gfxContextMatrixAutoSaveRestore matSR;
|
||||
nsPoint offsetToBoundingBox;
|
||||
nsPoint offsetToUserSpace;
|
||||
|
@ -817,8 +793,9 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams)
|
|||
|
||||
SetupContextMatrix(frame, aParams, offsetToBoundingBox,
|
||||
offsetToUserSpace);
|
||||
result = PaintMaskSurface(aParams, maskTarget,
|
||||
shouldPushOpacity ? 1.0 : maskUsage.opacity,
|
||||
nsTArray<nsSVGMaskFrame *> maskFrames = effectProperties.GetMaskFrames();
|
||||
|
||||
result = PaintMaskSurface(aParams, maskTarget, 1.0,
|
||||
firstFrame->StyleContext(), maskFrames,
|
||||
ctx.CurrentMatrix(), offsetToUserSpace);
|
||||
if (result != DrawResult::SUCCESS) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче