Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1781)

Unified Diff: Source/core/svg/SVGGraphicsElement.cpp

Issue 701433002: Lazily allocate svg shape transforms, shrink RenderSVGShape by 44B (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGGraphicsElement.cpp
diff --git a/Source/core/svg/SVGGraphicsElement.cpp b/Source/core/svg/SVGGraphicsElement.cpp
index 61075da967ce57a3aa76961c4b597e8d09c15498..79d2ae77f7f7c370464ebd601381d15fbe8190c9 100644
--- a/Source/core/svg/SVGGraphicsElement.cpp
+++ b/Source/core/svg/SVGGraphicsElement.cpp
@@ -122,6 +122,14 @@ PassRefPtr<SVGMatrixTearOff> SVGGraphicsElement::getScreenCTMFromJavascript()
return SVGMatrixTearOff::create(getScreenCTM());
}
+bool SVGGraphicsElement::hasAnimatedLocalTransform() const
+{
+ RenderStyle* style = renderer() ? renderer()->style() : 0;
+
+ // Each of these is used in SVGGraphicsElement::calculateAnimatedLocalTransform to create an animated local transform.
+ return (style && style->hasTransform()) || !m_transform->currentValue()->isEmpty() || hasSVGRareData();
+}
+
AffineTransform SVGGraphicsElement::calculateAnimatedLocalTransform() const
{
AffineTransform matrix;

Powered by Google App Engine
This is Rietveld 408576698