зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1349741 - Part 1. Correct the transform matrix of a context that pass to nsFilterInstance::PaintFilteredFrame. r=mstange
MozReview-Commit-ID: 9BISQehlSgG --HG-- extra : rebase_source : b24635e2e9c790906fd823aad456da12a9fdff16
This commit is contained in:
Родитель
a25a473801
Коммит
8be5ee7510
|
@ -503,14 +503,8 @@ nsFilterInstance::Render(DrawTarget* aDrawTarget)
|
|||
}
|
||||
|
||||
AutoRestoreTransform autoRestoreTransform(aDrawTarget);
|
||||
gfxMatrix filterSpaceToUserSpace = mPaintTransform;
|
||||
DebugOnly<bool> invertible = filterSpaceToUserSpace.Invert();
|
||||
MOZ_ASSERT(invertible);
|
||||
filterSpaceToUserSpace *= nsSVGUtils::GetCSSPxToDevPxMatrix(mTargetFrame);
|
||||
|
||||
Matrix newTM =
|
||||
ToMatrix(filterSpaceToUserSpace).PreTranslate(filterRect.x, filterRect.y) *
|
||||
aDrawTarget->GetTransform();
|
||||
aDrawTarget->GetTransform().PreTranslate(filterRect.x, filterRect.y);
|
||||
aDrawTarget->SetTransform(newTM);
|
||||
|
||||
ComputeNeededBoxes();
|
||||
|
|
|
@ -1093,6 +1093,11 @@ nsSVGIntegrationUtils::PaintFilter(const PaintFramesParams& aParams)
|
|||
gfxMatrix scaleMatrix(scaleFactors.width, 0.0f,
|
||||
0.0f, scaleFactors.height,
|
||||
0.0f, 0.0f);
|
||||
gfxMatrix reverseScaleMatrix = scaleMatrix;
|
||||
DebugOnly<bool> invertible = reverseScaleMatrix.Invert();
|
||||
MOZ_ASSERT(invertible);
|
||||
context.SetMatrix(reverseScaleMatrix * context.CurrentMatrix());
|
||||
|
||||
gfxMatrix tm =
|
||||
scaleMatrix * nsSVGUtils::GetCSSPxToDevPxMatrix(frame);
|
||||
DrawResult result =
|
||||
|
|
|
@ -883,12 +883,6 @@ nsSVGUtils::PaintFrameWithEffects(nsIFrame *aFrame,
|
|||
dirtyRegion = &tmpDirtyRegion;
|
||||
}
|
||||
|
||||
gfxContextMatrixAutoSaveRestore saver(target);
|
||||
gfxMatrix devPxToCssPxTM = nsSVGUtils::GetCSSPxToDevPxMatrix(aFrame);
|
||||
DebugOnly<bool> invertible = devPxToCssPxTM.Invert();
|
||||
MOZ_ASSERT(invertible);
|
||||
target->SetMatrix(aTransform * devPxToCssPxTM);
|
||||
|
||||
SVGPaintCallback paintCallback(aFlags);
|
||||
result =
|
||||
nsFilterInstance::PaintFilteredFrame(aFrame, target->GetDrawTarget(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче