mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1052915 - Stop unnecessarily calling nsSVGUtils::AdjustMatrixForUnits() over and over in nsSVGClipPathFrame. r=longsonr
This commit is contained in:
parent
7ad915612a
commit
eb53e85094
@ -41,12 +41,7 @@ nsSVGClipPathFrame::ClipPaint(nsRenderingContext* aContext,
|
||||
}
|
||||
AutoClipPathReferencer clipRef(this);
|
||||
|
||||
mClipParent = aParent;
|
||||
if (mClipParentMatrix) {
|
||||
*mClipParentMatrix = aMatrix;
|
||||
} else {
|
||||
mClipParentMatrix = new gfxMatrix(aMatrix);
|
||||
}
|
||||
mMatrixForChildren = GetClipPathTransform(aParent) * aMatrix;
|
||||
|
||||
gfxContext *gfx = aContext->ThebesContext();
|
||||
|
||||
@ -325,15 +320,7 @@ nsSVGClipPathFrame::GetType() const
|
||||
gfxMatrix
|
||||
nsSVGClipPathFrame::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot)
|
||||
{
|
||||
SVGClipPathElement *content = static_cast<SVGClipPathElement*>(mContent);
|
||||
|
||||
gfxMatrix tm =
|
||||
content->PrependLocalTransformsTo(mClipParentMatrix ?
|
||||
*mClipParentMatrix : gfxMatrix());
|
||||
|
||||
return nsSVGUtils::AdjustMatrixForUnits(tm,
|
||||
&content->mEnumAttributes[SVGClipPathElement::CLIPPATHUNITS],
|
||||
mClipParent);
|
||||
return mMatrixForChildren;
|
||||
}
|
||||
|
||||
gfxMatrix
|
||||
|
@ -110,8 +110,7 @@ public:
|
||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
};
|
||||
|
||||
nsIFrame *mClipParent;
|
||||
nsAutoPtr<gfxMatrix> mClipParentMatrix;
|
||||
gfxMatrix mMatrixForChildren;
|
||||
// recursion prevention flag
|
||||
bool mInUse;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user