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

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h 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 "platform/animation/CompositorFloatAnimationCurve.h" 5 #include "platform/animation/CompositorFloatAnimationCurve.h"
6 6
7 #include "cc/animation/animation_curve.h" 7 #include "cc/animation/animation_curve.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/timing_function.h" 9 #include "cc/animation/timing_function.h"
10 #include "wtf/PtrUtil.h" 10 #include "wtf/PtrUtil.h"
(...skipping 13 matching lines...) Expand all
24 std::unique_ptr<CompositorFloatAnimationCurve> 24 std::unique_ptr<CompositorFloatAnimationCurve>
25 CompositorFloatAnimationCurve::createForTesting( 25 CompositorFloatAnimationCurve::createForTesting(
26 std::unique_ptr<cc::KeyframedFloatAnimationCurve> curve) { 26 std::unique_ptr<cc::KeyframedFloatAnimationCurve> curve) {
27 return WTF::wrapUnique(new CompositorFloatAnimationCurve(std::move(curve))); 27 return WTF::wrapUnique(new CompositorFloatAnimationCurve(std::move(curve)));
28 } 28 }
29 29
30 CompositorFloatAnimationCurve::Keyframes 30 CompositorFloatAnimationCurve::Keyframes
31 CompositorFloatAnimationCurve::keyframesForTesting() const { 31 CompositorFloatAnimationCurve::keyframesForTesting() const {
32 Keyframes keyframes; 32 Keyframes keyframes;
33 for (const auto& ccKeyframe : m_curve->keyframes_for_testing()) { 33 for (const auto& ccKeyframe : m_curve->keyframes_for_testing()) {
34 keyframes.append( 34 keyframes.push_back(
35 WTF::wrapUnique(new CompositorFloatKeyframe(ccKeyframe->Clone()))); 35 WTF::wrapUnique(new CompositorFloatKeyframe(ccKeyframe->Clone())));
36 } 36 }
37 return keyframes; 37 return keyframes;
38 } 38 }
39 39
40 PassRefPtr<TimingFunction> 40 PassRefPtr<TimingFunction>
41 CompositorFloatAnimationCurve::getTimingFunctionForTesting() const { 41 CompositorFloatAnimationCurve::getTimingFunctionForTesting() const {
42 return createCompositorTimingFunctionFromCC( 42 return createCompositorTimingFunctionFromCC(
43 m_curve->timing_function_for_testing()); 43 m_curve->timing_function_for_testing());
44 } 44 }
(...skipping 15 matching lines...) Expand all
60 float CompositorFloatAnimationCurve::getValue(double time) const { 60 float CompositorFloatAnimationCurve::getValue(double time) const {
61 return m_curve->GetValue(base::TimeDelta::FromSecondsD(time)); 61 return m_curve->GetValue(base::TimeDelta::FromSecondsD(time));
62 } 62 }
63 63
64 std::unique_ptr<cc::AnimationCurve> 64 std::unique_ptr<cc::AnimationCurve>
65 CompositorFloatAnimationCurve::cloneToAnimationCurve() const { 65 CompositorFloatAnimationCurve::cloneToAnimationCurve() const {
66 return m_curve->Clone(); 66 return m_curve->Clone();
67 } 67 }
68 68
69 } // namespace blink 69 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698