OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/animation/PathInterpolationFunctions.h" | 5 #include "core/animation/PathInterpolationFunctions.h" |
6 | 6 |
7 #include "core/animation/InterpolatedSVGPathSource.h" | 7 #include "core/animation/InterpolatedSVGPathSource.h" |
8 #include "core/animation/InterpolationEnvironment.h" | 8 #include "core/animation/InterpolationEnvironment.h" |
9 #include "core/animation/SVGPathSegInterpolationFunctions.h" | 9 #include "core/animation/SVGPathSegInterpolationFunctions.h" |
10 #include "core/css/CSSPathValue.h" | 10 #include "core/css/CSSPathValue.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return convertValue(*emptyPath); | 86 return convertValue(*emptyPath); |
87 } | 87 } |
88 | 88 |
89 class UnderlyingPathSegTypesChecker | 89 class UnderlyingPathSegTypesChecker |
90 : public InterpolationType::ConversionChecker { | 90 : public InterpolationType::ConversionChecker { |
91 public: | 91 public: |
92 ~UnderlyingPathSegTypesChecker() final {} | 92 ~UnderlyingPathSegTypesChecker() final {} |
93 | 93 |
94 static std::unique_ptr<UnderlyingPathSegTypesChecker> create( | 94 static std::unique_ptr<UnderlyingPathSegTypesChecker> create( |
95 const InterpolationValue& underlying) { | 95 const InterpolationValue& underlying) { |
96 return wrapUnique( | 96 return WTF::wrapUnique( |
97 new UnderlyingPathSegTypesChecker(getPathSegTypes(underlying))); | 97 new UnderlyingPathSegTypesChecker(getPathSegTypes(underlying))); |
98 } | 98 } |
99 | 99 |
100 private: | 100 private: |
101 UnderlyingPathSegTypesChecker(const Vector<SVGPathSegType>& pathSegTypes) | 101 UnderlyingPathSegTypesChecker(const Vector<SVGPathSegType>& pathSegTypes) |
102 : m_pathSegTypes(pathSegTypes) {} | 102 : m_pathSegTypes(pathSegTypes) {} |
103 | 103 |
104 static const Vector<SVGPathSegType>& getPathSegTypes( | 104 static const Vector<SVGPathSegType>& getPathSegTypes( |
105 const InterpolationValue& underlying) { | 105 const InterpolationValue& underlying) { |
106 return toSVGPathNonInterpolableValue(*underlying.nonInterpolableValue) | 106 return toSVGPathNonInterpolableValue(*underlying.nonInterpolableValue) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 InterpolatedSVGPathSource source( | 191 InterpolatedSVGPathSource source( |
192 toInterpolableList( | 192 toInterpolableList( |
193 *toInterpolableList(interpolableValue).get(PathArgsIndex)), | 193 *toInterpolableList(interpolableValue).get(PathArgsIndex)), |
194 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); | 194 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); |
195 SVGPathByteStreamBuilder builder(*pathByteStream); | 195 SVGPathByteStreamBuilder builder(*pathByteStream); |
196 SVGPathParser::parsePath(source, builder); | 196 SVGPathParser::parsePath(source, builder); |
197 return pathByteStream; | 197 return pathByteStream; |
198 } | 198 } |
199 | 199 |
200 } // namespace blink | 200 } // namespace blink |
OLD | NEW |