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

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

Issue 678863002: Move SVG shape painting code to SVGShapePainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update per reviewer comments Created 6 years, 2 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/rendering/svg/RenderSVGShape.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGMarkerData.h
diff --git a/Source/core/rendering/svg/SVGMarkerData.h b/Source/core/rendering/svg/SVGMarkerData.h
index 17032d108d9270c139166f90c8e2d4115b810806..b35bffdf1cec43f3cca3f93400845b1fe632109a 100644
--- a/Source/core/rendering/svg/SVGMarkerData.h
+++ b/Source/core/rendering/svg/SVGMarkerData.h
@@ -45,6 +45,8 @@ struct MarkerPosition {
float angle;
};
+class RenderSVGResourceMarker;
+
class SVGMarkerData {
public:
SVGMarkerData(Vector<MarkerPosition>& positions, bool autoStartReverse)
@@ -77,6 +79,21 @@ public:
m_positions.append(MarkerPosition(EndMarker, m_origin, currentAngle(EndMarker)));
}
+ static inline RenderSVGResourceMarker* markerForType(const SVGMarkerType& type, RenderSVGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, RenderSVGResourceMarker* markerEnd)
+ {
+ switch (type) {
+ case StartMarker:
+ return markerStart;
+ case MidMarker:
+ return markerMid;
+ case EndMarker:
+ return markerEnd;
+ }
+
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
+
private:
float currentAngle(SVGMarkerType type) const
{
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698