| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/animation/animation_curve.h" | 5 #include "cc/animation/animation_curve.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "cc/animation/scroll_offset_animation_curve.h" | 8 #include "cc/animation/scroll_offset_animation_curve.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const { | 50 const { |
| 51 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET); | 51 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET); |
| 52 return static_cast<const ScrollOffsetAnimationCurve*>(this); | 52 return static_cast<const ScrollOffsetAnimationCurve*>(this); |
| 53 } | 53 } |
| 54 | 54 |
| 55 ScrollOffsetAnimationCurve* AnimationCurve::ToScrollOffsetAnimationCurve() { | 55 ScrollOffsetAnimationCurve* AnimationCurve::ToScrollOffsetAnimationCurve() { |
| 56 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET); | 56 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET); |
| 57 return static_cast<ScrollOffsetAnimationCurve*>(this); | 57 return static_cast<ScrollOffsetAnimationCurve*>(this); |
| 58 } | 58 } |
| 59 | 59 |
| 60 const SizeAnimationCurve* AnimationCurve::ToSizeAnimationCurve() const { |
| 61 DCHECK(Type() == AnimationCurve::SIZE); |
| 62 return static_cast<const SizeAnimationCurve*>(this); |
| 63 } |
| 64 |
| 65 AnimationCurve::CurveType SizeAnimationCurve::Type() const { |
| 66 return SIZE; |
| 67 } |
| 68 |
| 60 } // namespace cc | 69 } // namespace cc |
| OLD | NEW |