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 enum StepAtPosition { Start, Middle, End }; | |
ajuma
2014/12/17 16:32:56
This doesn't seem to be used anywhere. Were you pl
loyso (OOO)
2014/12/18 01:53:05
I forgot to erase this enum. I had the initial imp
| |
87 | |
88 static scoped_ptr<StepsTimingFunction> Create(int steps, | |
89 float steps_start_offset); | |
90 ~StepsTimingFunction() override; | |
91 | |
92 float GetValue(double t) const override; | |
93 scoped_ptr<TimingFunction> Clone() const override; | |
94 | |
95 void Range(float* min, float* max) const override; | |
96 float Velocity(double time) const override; | |
97 | |
98 protected: | |
99 StepsTimingFunction(int steps, float steps_start_offset); | |
100 | |
101 private: | |
102 int steps_; | |
103 float steps_start_offset_; | |
104 | |
105 DISALLOW_ASSIGN(StepsTimingFunction); | |
106 }; | |
107 | |
84 } // namespace cc | 108 } // namespace cc |
85 | 109 |
86 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ | 110 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ |
OLD | NEW |