Only create a single display transform for SVG frames with single child transforms.

This improves performance on repeated scaling of vectors.
This commit is contained in:
wolfbeast 2017-06-28 21:47:18 +02:00 committed by Roy Tam
commit fafc5f0ec1
2 changed files with 36 additions and 13 deletions

View file

@ -263,6 +263,9 @@ public:
*/
virtual nsIAtom* GetType() const override;
bool IsSVGTransformed(Matrix *aOwnTransform,
Matrix *aFromParentTransform) const override;
// nsSVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override {
// GetCanvasTM returns the transform from an SVG frame to the frame's
@ -270,8 +273,6 @@ public:
// set on us for any CSS border or padding on our nsSVGOuterSVGFrame.
return static_cast<nsSVGOuterSVGFrame*>(GetParent())->GetCanvasTM();
}
virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const override;
};
#endif