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

Unified Diff: Source/core/layout/svg/LayoutSVGShape.h

Issue 1158583003: Reduce how often LayoutSVGShape::updateShapeFromElement is called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Put selfHasRelativeLengths back Created 5 years, 6 months 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRect.cpp ('k') | Source/core/layout/svg/LayoutSVGShape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGShape.h
diff --git a/Source/core/layout/svg/LayoutSVGShape.h b/Source/core/layout/svg/LayoutSVGShape.h
index 2aa5d9cbf143b85dd305597737684ca0617b5acc..27885f833cedce29b8e17df8e0aa45f8db3ff1e4 100644
--- a/Source/core/layout/svg/LayoutSVGShape.h
+++ b/Source/core/layout/svg/LayoutSVGShape.h
@@ -61,7 +61,6 @@ public:
ASSERT(m_path);
return *m_path;
}
- bool hasPath() const { return m_path.get(); }
virtual bool isShapeEmpty() const { return path().isEmpty(); }
@@ -83,9 +82,12 @@ public:
protected:
void clearPath() { m_path.clear(); }
- void createPath();
+ // Reconstruct the Path. Subclasses may use geometry knowledge to avoid creating a Path.
virtual void updateShapeFromElement();
+
+ virtual void updateStrokeAndFillBoundingBoxes();
+
// Calculates an inclusive bounding box of this shape as if this shape has
// a stroke. If this shape has a stroke, then m_strokeBoundingBox is returned;
// otherwise, estimates a bounding box (not necessarily tight) that would
@@ -112,8 +114,7 @@ private:
virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override final;
virtual FloatRect strokeBoundingBox() const override final { return m_strokeBoundingBox; }
- FloatRect calculateObjectBoundingBox() const;
- FloatRect calculateStrokeBoundingBox() const;
+
void updatePaintInvalidationBoundingBox();
void updateLocalTransform();
« no previous file with comments | « Source/core/layout/svg/LayoutSVGRect.cpp ('k') | Source/core/layout/svg/LayoutSVGShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698