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

Side by Side Diff: third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp

Issue 2622043003: Replaced RefPtr::release with std::move in Source/core. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 InterpolationValue&& end) { 148 InterpolationValue&& end) {
149 const Vector<SVGPathSegType>& startTypes = 149 const Vector<SVGPathSegType>& startTypes =
150 toSVGPathNonInterpolableValue(*start.nonInterpolableValue).pathSegTypes(); 150 toSVGPathNonInterpolableValue(*start.nonInterpolableValue).pathSegTypes();
151 const Vector<SVGPathSegType>& endTypes = 151 const Vector<SVGPathSegType>& endTypes =
152 toSVGPathNonInterpolableValue(*end.nonInterpolableValue).pathSegTypes(); 152 toSVGPathNonInterpolableValue(*end.nonInterpolableValue).pathSegTypes();
153 if (!pathSegTypesMatch(startTypes, endTypes)) 153 if (!pathSegTypesMatch(startTypes, endTypes))
154 return nullptr; 154 return nullptr;
155 155
156 return PairwiseInterpolationValue(std::move(start.interpolableValue), 156 return PairwiseInterpolationValue(std::move(start.interpolableValue),
157 std::move(end.interpolableValue), 157 std::move(end.interpolableValue),
158 end.nonInterpolableValue.release()); 158 std::move(end.nonInterpolableValue));
159 } 159 }
160 160
161 void PathInterpolationFunctions::composite( 161 void PathInterpolationFunctions::composite(
162 UnderlyingValueOwner& underlyingValueOwner, 162 UnderlyingValueOwner& underlyingValueOwner,
163 double underlyingFraction, 163 double underlyingFraction,
164 const InterpolationType& type, 164 const InterpolationType& type,
165 const InterpolationValue& value) { 165 const InterpolationValue& value) {
166 const InterpolableList& list = toInterpolableList(*value.interpolableValue); 166 const InterpolableList& list = toInterpolableList(*value.interpolableValue);
167 double neutralComponent = 167 double neutralComponent =
168 toInterpolableNumber(list.get(PathNeutralIndex))->value(); 168 toInterpolableNumber(list.get(PathNeutralIndex))->value();
(...skipping 23 matching lines...) Expand all
192 InterpolatedSVGPathSource source( 192 InterpolatedSVGPathSource source(
193 toInterpolableList( 193 toInterpolableList(
194 *toInterpolableList(interpolableValue).get(PathArgsIndex)), 194 *toInterpolableList(interpolableValue).get(PathArgsIndex)),
195 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); 195 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes());
196 SVGPathByteStreamBuilder builder(*pathByteStream); 196 SVGPathByteStreamBuilder builder(*pathByteStream);
197 SVGPathParser::parsePath(source, builder); 197 SVGPathParser::parsePath(source, builder);
198 return pathByteStream; 198 return pathByteStream;
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698