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

Unified Diff: Source/core/rendering/svg/RenderSVGShape.h

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/rendering/svg/RenderSVGShape.h
diff --git a/Source/core/rendering/svg/RenderSVGShape.h b/Source/core/rendering/svg/RenderSVGShape.h
index 08ac06d4cb79e3cb3fb632a96191fa3021388ee2..d7c09490917add0c35852eeddad5ce688e9174ae 100644
--- a/Source/core/rendering/svg/RenderSVGShape.h
+++ b/Source/core/rendering/svg/RenderSVGShape.h
@@ -70,7 +70,7 @@ public:
bool hasNonScalingStroke() const { return style()->svgStyle().vectorEffect() == VE_NON_SCALING_STROKE; }
Path* nonScalingStrokePath(const Path*, const AffineTransform&) const;
AffineTransform nonScalingStrokeTransform() const;
- virtual AffineTransform localTransform() const override final { return m_localTransform; }
+ virtual AffineTransform localTransform() const override final { return m_localTransform ? *m_localTransform : RenderSVGModelObject::localTransform(); }
virtual const Vector<MarkerPosition>* markerPositions() const { return 0; }
@@ -98,7 +98,7 @@ private:
bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRule fillRule = RULE_NONZERO);
bool strokeContains(const FloatPoint&, bool requiresStroke = true);
- virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform; }
+ virtual const AffineTransform& localToParentTransform() const override final { return m_localTransform ? *m_localTransform : RenderSVGModelObject::localToParentTransform(); }
virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGShape || RenderSVGModelObject::isOfType(type); }
virtual const char* renderName() const override { return "RenderSVGShape"; }
@@ -116,7 +116,7 @@ private:
private:
FloatRect m_paintInvalidationBoundingBox;
- AffineTransform m_localTransform;
+ OwnPtr<AffineTransform> m_localTransform;
OwnPtr<Path> m_path;
bool m_needsBoundariesUpdate : 1;
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGShape.cpp » ('j') | Source/core/rendering/svg/RenderSVGShape.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698