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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte
rpolableValue*>(value.nonInterpolableValue()); // Take ref. | 153 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte
rpolableValue*>(value.nonInterpolableValue()); // Take ref. |
154 } | 154 } |
155 | 155 |
156 PassRefPtr<SVGPathByteStream> PathInterpolationFunctions::appliedValue(const Int
erpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableVa
lue) | 156 PassRefPtr<SVGPathByteStream> PathInterpolationFunctions::appliedValue(const Int
erpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableVa
lue) |
157 { | 157 { |
158 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); | 158 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); |
159 InterpolatedSVGPathSource source( | 159 InterpolatedSVGPathSource source( |
160 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn
dex)), | 160 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn
dex)), |
161 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); | 161 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); |
162 SVGPathByteStreamBuilder builder(*pathByteStream); | 162 SVGPathByteStreamBuilder builder(*pathByteStream); |
163 SVGPathParser(&source, &builder).parsePathDataFromSource(false); | 163 SVGPathParser::parsePath(source, builder); |
164 return pathByteStream.release(); | 164 return pathByteStream.release(); |
165 } | 165 } |
166 | 166 |
167 } // namespace blink | 167 } // namespace blink |
OLD | NEW |