| 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/CompositorScrollOffsetAnimationCurve.h" | 5 #include "platform/animation/CompositorScrollOffsetAnimationCurve.h" |
| 6 | 6 |
| 7 #include "cc/animation/scroll_offset_animation_curve.h" | 7 #include "cc/animation/scroll_offset_animation_curve.h" |
| 8 #include "cc/animation/timing_function.h" | 8 #include "cc/animation/timing_function.h" |
| 9 | 9 |
| 10 using blink::CompositorScrollOffsetAnimationCurve; | 10 using blink::CompositorScrollOffsetAnimationCurve; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 FloatPoint targetValue, | 32 FloatPoint targetValue, |
| 33 TimingFunctionType timingFunction, | 33 TimingFunctionType timingFunction, |
| 34 ScrollDurationBehavior durationBehavior) | 34 ScrollDurationBehavior durationBehavior) |
| 35 : m_curve(cc::ScrollOffsetAnimationCurve::Create( | 35 : m_curve(cc::ScrollOffsetAnimationCurve::Create( |
| 36 gfx::ScrollOffset(targetValue.x(), targetValue.y()), | 36 gfx::ScrollOffset(targetValue.x(), targetValue.y()), |
| 37 createTimingFunction(timingFunction), | 37 createTimingFunction(timingFunction), |
| 38 GetDurationBehavior(durationBehavior))) | 38 GetDurationBehavior(durationBehavior))) |
| 39 { | 39 { |
| 40 } | 40 } |
| 41 | 41 |
| 42 CompositorScrollOffsetAnimationCurve::CompositorScrollOffsetAnimationCurve( |
| 43 cc::ScrollOffsetAnimationCurve* curve) |
| 44 : m_curve(curve->CloneToScrollOffsetAnimationCurve()) |
| 45 { |
| 46 } |
| 47 |
| 42 CompositorScrollOffsetAnimationCurve::~CompositorScrollOffsetAnimationCurve() | 48 CompositorScrollOffsetAnimationCurve::~CompositorScrollOffsetAnimationCurve() |
| 43 { | 49 { |
| 44 } | 50 } |
| 45 | 51 |
| 46 CompositorAnimationCurve::AnimationCurveType CompositorScrollOffsetAnimationCurv
e::type() const | 52 CompositorAnimationCurve::AnimationCurveType CompositorScrollOffsetAnimationCurv
e::type() const |
| 47 { | 53 { |
| 48 return CompositorAnimationCurve::AnimationCurveTypeScrollOffset; | 54 return CompositorAnimationCurve::AnimationCurveTypeScrollOffset; |
| 49 } | 55 } |
| 50 | 56 |
| 51 void CompositorScrollOffsetAnimationCurve::setInitialValue(FloatPoint initialVal
ue) | 57 void CompositorScrollOffsetAnimationCurve::setInitialValue(FloatPoint initialVal
ue) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 74 { | 80 { |
| 75 m_curve->UpdateTarget(time, gfx::ScrollOffset(newTarget.x(), newTarget.y()))
; | 81 m_curve->UpdateTarget(time, gfx::ScrollOffset(newTarget.x(), newTarget.y()))
; |
| 76 } | 82 } |
| 77 | 83 |
| 78 scoped_ptr<cc::AnimationCurve> CompositorScrollOffsetAnimationCurve::cloneToAnim
ationCurve() const | 84 scoped_ptr<cc::AnimationCurve> CompositorScrollOffsetAnimationCurve::cloneToAnim
ationCurve() const |
| 79 { | 85 { |
| 80 return m_curve->Clone(); | 86 return m_curve->Clone(); |
| 81 } | 87 } |
| 82 | 88 |
| 83 } // namespace blink | 89 } // namespace blink |
| OLD | NEW |