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

Unified Diff: third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h

Issue 1646543004: Refactor away SVGPathSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use namespace Created 4 years, 11 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 | « no previous file | third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h
diff --git a/third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h b/third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h
index 62523418ded7eca863c5f5998695a2bb3822bdf6..3cbceb8c24034523884d9313d5720d67c555c996 100644
--- a/third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h
+++ b/third_party/WebKit/Source/core/animation/InterpolatedSVGPathSource.h
@@ -6,12 +6,14 @@
#define InterpolatedSVGPathSource_h
#include "core/animation/SVGPathSegInterpolationFunctions.h"
-#include "core/svg/SVGPathSource.h"
+#include "core/svg/SVGPathData.h"
#include "wtf/Vector.h"
namespace blink {
-class InterpolatedSVGPathSource : public SVGPathSource {
+class InterpolatedSVGPathSource {
+ WTF_MAKE_NONCOPYABLE(InterpolatedSVGPathSource);
+ STACK_ALLOCATED();
public:
InterpolatedSVGPathSource(const InterpolableList& listValue, const Vector<SVGPathSegType>& pathSegTypes)
: m_currentIndex(0)
@@ -21,11 +23,10 @@ public:
ASSERT(m_interpolablePathSegs.length() == m_pathSegTypes.size());
}
-private:
- bool hasMoreData() const override;
- SVGPathSegType peekSegmentType() override;
- PathSegmentData parseSegment() override;
+ bool hasMoreData() const;
+ PathSegmentData parseSegment();
+private:
PathCoordinates m_currentCoordinates;
size_t m_currentIndex;
const InterpolableList& m_interpolablePathSegs;
@@ -37,12 +38,6 @@ bool InterpolatedSVGPathSource::hasMoreData() const
return m_currentIndex < m_interpolablePathSegs.length();
}
-SVGPathSegType InterpolatedSVGPathSource::peekSegmentType()
-{
- ASSERT(hasMoreData());
- return m_pathSegTypes.at(m_currentIndex);
-}
-
PathSegmentData InterpolatedSVGPathSource::parseSegment()
{
PathSegmentData segment = SVGPathSegInterpolationFunctions::consumeInterpolablePathSeg(*m_interpolablePathSegs.get(m_currentIndex), m_pathSegTypes.at(m_currentIndex), m_currentCoordinates);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698