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 #ifndef CC_ANIMATION_TIMING_FUNCTION_H_ | 5 #ifndef CC_ANIMATION_TIMING_FUNCTION_H_ |
6 #define CC_ANIMATION_TIMING_FUNCTION_H_ | 6 #define CC_ANIMATION_TIMING_FUNCTION_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
9 #include "ui/gfx/geometry/cubic_bezier.h" | 9 #include "ui/gfx/geometry/cubic_bezier.h" |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 }; | 74 }; |
75 | 75 |
76 class CC_EXPORT EaseInOutTimingFunction { | 76 class CC_EXPORT EaseInOutTimingFunction { |
77 public: | 77 public: |
78 static scoped_ptr<TimingFunction> Create(); | 78 static scoped_ptr<TimingFunction> Create(); |
79 | 79 |
80 private: | 80 private: |
81 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction); | 81 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction); |
82 }; | 82 }; |
83 | 83 |
| 84 class CC_EXPORT StepsTimingFunction : public TimingFunction { |
| 85 public: |
| 86 static scoped_ptr<StepsTimingFunction> Create(int steps, |
| 87 float steps_start_offset); |
| 88 ~StepsTimingFunction() override; |
| 89 |
| 90 float GetValue(double t) const override; |
| 91 scoped_ptr<TimingFunction> Clone() const override; |
| 92 |
| 93 void Range(float* min, float* max) const override; |
| 94 float Velocity(double time) const override; |
| 95 |
| 96 protected: |
| 97 StepsTimingFunction(int steps, float steps_start_offset); |
| 98 |
| 99 private: |
| 100 int steps_; |
| 101 float steps_start_offset_; |
| 102 |
| 103 DISALLOW_ASSIGN(StepsTimingFunction); |
| 104 }; |
| 105 |
84 } // namespace cc | 106 } // namespace cc |
85 | 107 |
86 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ | 108 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ |
OLD | NEW |