| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/SVGPathInterpolationType.h" | 5 #include "core/animation/SVGPathInterpolationType.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/svg/SVGPath.h" | 10 #include "core/svg/SVGPath.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 ASSERT(pathSegTypesMatch( | 151 ASSERT(pathSegTypesMatch( |
| 152 toSVGPathNonInterpolableValue(underlyingValue->nonInterpolableValue())->
pathSegTypes(), | 152 toSVGPathNonInterpolableValue(underlyingValue->nonInterpolableValue())->
pathSegTypes(), |
| 153 toSVGPathNonInterpolableValue(value.nonInterpolableValue())->pathSegType
s())); | 153 toSVGPathNonInterpolableValue(value.nonInterpolableValue())->pathSegType
s())); |
| 154 underlyingValue.mutableComponent().interpolableValue->scaleAndAdd(neutralCom
ponent, value.interpolableValue()); | 154 underlyingValue.mutableComponent().interpolableValue->scaleAndAdd(neutralCom
ponent, value.interpolableValue()); |
| 155 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte
rpolableValue*>(value.nonInterpolableValue()); // Take ref. | 155 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte
rpolableValue*>(value.nonInterpolableValue()); // Take ref. |
| 156 } | 156 } |
| 157 | 157 |
| 158 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGPathInterpolationType::appliedSVGValu
e(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInt
erpolableValue) const | 158 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGPathInterpolationType::appliedSVGValu
e(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInt
erpolableValue) const |
| 159 { | 159 { |
| 160 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); | 160 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); |
| 161 InterpolatedSVGPathSource source( | 161 InterpolatedSVGPathSource source( |
| 162 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn
dex)), | 162 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn
dex)), |
| 163 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); | 163 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); |
| 164 SVGPathByteStreamBuilder builder(*pathByteStream); | 164 SVGPathByteStreamBuilder builder(*pathByteStream); |
| 165 SVGPathParser(&source, &builder).parsePathDataFromSource(UnalteredParsing, f
alse); | 165 SVGPathParser(&source, &builder).parsePathDataFromSource(UnalteredParsing, f
alse); |
| 166 return SVGPath::create(CSSPathValue::create(pathByteStream.release())); | 166 return SVGPath::create(CSSPathValue::create(pathByteStream.release())); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace blink | 169 } // namespace blink |
| OLD | NEW |