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

Side by Side Diff: third_party/WebKit/Source/core/animation/ShadowInterpolationFunctions.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 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/ShadowInterpolationFunctions.h" 5 #include "core/animation/ShadowInterpolationFunctions.h"
6 6
7 #include "core/animation/CSSColorInterpolationType.h" 7 #include "core/animation/CSSColorInterpolationType.h"
8 #include "core/animation/InterpolationValue.h" 8 #include "core/animation/InterpolationValue.h"
9 #include "core/animation/LengthInterpolationFunctions.h" 9 #include "core/animation/LengthInterpolationFunctions.h"
10 #include "core/animation/NonInterpolableValue.h" 10 #include "core/animation/NonInterpolableValue.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 PairwiseInterpolationValue ShadowInterpolationFunctions::maybeMergeSingles( 58 PairwiseInterpolationValue ShadowInterpolationFunctions::maybeMergeSingles(
59 InterpolationValue&& start, 59 InterpolationValue&& start,
60 InterpolationValue&& end) { 60 InterpolationValue&& end) {
61 if (!nonInterpolableValuesAreCompatible(start.nonInterpolableValue.get(), 61 if (!nonInterpolableValuesAreCompatible(start.nonInterpolableValue.get(),
62 end.nonInterpolableValue.get())) 62 end.nonInterpolableValue.get()))
63 return nullptr; 63 return nullptr;
64 return PairwiseInterpolationValue(std::move(start.interpolableValue), 64 return PairwiseInterpolationValue(std::move(start.interpolableValue),
65 std::move(end.interpolableValue), 65 std::move(end.interpolableValue),
66 start.nonInterpolableValue.release()); 66 std::move(start.nonInterpolableValue));
67 } 67 }
68 68
69 InterpolationValue ShadowInterpolationFunctions::convertShadowData( 69 InterpolationValue ShadowInterpolationFunctions::convertShadowData(
70 const ShadowData& shadowData, 70 const ShadowData& shadowData,
71 double zoom) { 71 double zoom) {
72 std::unique_ptr<InterpolableList> interpolableList = 72 std::unique_ptr<InterpolableList> interpolableList =
73 InterpolableList::create(ShadowComponentIndexCount); 73 InterpolableList::create(ShadowComponentIndexCount);
74 interpolableList->set(ShadowX, 74 interpolableList->set(ShadowX,
75 LengthInterpolationFunctions::createInterpolablePixels( 75 LengthInterpolationFunctions::createInterpolablePixels(
76 shadowData.x() / zoom)); 76 shadowData.x() / zoom));
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 DCHECK(shadowX.isFixed() && shadowY.isFixed() && shadowBlur.isFixed() && 187 DCHECK(shadowX.isFixed() && shadowY.isFixed() && shadowBlur.isFixed() &&
188 shadowSpread.isFixed()); 188 shadowSpread.isFixed());
189 return ShadowData(FloatPoint(shadowX.value(), shadowY.value()), 189 return ShadowData(FloatPoint(shadowX.value(), shadowY.value()),
190 shadowBlur.value(), shadowSpread.value(), 190 shadowBlur.value(), shadowSpread.value(),
191 shadowNonInterpolableValue.style(), 191 shadowNonInterpolableValue.style(),
192 CSSColorInterpolationType::resolveInterpolableColor( 192 CSSColorInterpolationType::resolveInterpolableColor(
193 *interpolableList.get(ShadowColor), state)); 193 *interpolableList.get(ShadowColor), state));
194 } 194 }
195 195
196 } // namespace blink 196 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698