| 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 "platform/animation/CompositorFloatAnimationCurve.h" | 5 #include "platform/animation/CompositorFloatAnimationCurve.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "cc/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
| 8 #include "cc/animation/keyframed_animation_curve.h" | 9 #include "cc/animation/keyframed_animation_curve.h" |
| 9 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| 10 #include "wtf/PtrUtil.h" | 11 #include "wtf/PtrUtil.h" |
| 11 #include <memory> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 CompositorFloatAnimationCurve::CompositorFloatAnimationCurve() | 15 CompositorFloatAnimationCurve::CompositorFloatAnimationCurve() |
| 16 : m_curve(cc::KeyframedFloatAnimationCurve::Create()) {} | 16 : m_curve(cc::KeyframedFloatAnimationCurve::Create()) {} |
| 17 | 17 |
| 18 CompositorFloatAnimationCurve::CompositorFloatAnimationCurve( | 18 CompositorFloatAnimationCurve::CompositorFloatAnimationCurve( |
| 19 std::unique_ptr<cc::KeyframedFloatAnimationCurve> curve) | 19 std::unique_ptr<cc::KeyframedFloatAnimationCurve> curve) |
| 20 : m_curve(std::move(curve)) {} | 20 : m_curve(std::move(curve)) {} |
| 21 | 21 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |