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/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "third_party/skia/include/core/SkScalar.h" | 10 #include "third_party/skia/include/core/SkScalar.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 | 47 |
48 double x1_; | 48 double x1_; |
49 double y1_; | 49 double y1_; |
50 double x2_; | 50 double x2_; |
51 double y2_; | 51 double y2_; |
52 | 52 |
53 private: | 53 private: |
54 DISALLOW_ASSIGN(CubicBezierTimingFunction); | 54 DISALLOW_ASSIGN(CubicBezierTimingFunction); |
55 }; | 55 }; |
56 | 56 |
57 class CC_EXPORT StepsTimingFunction : public TimingFunction { | |
58 public: | |
59 static scoped_ptr<StepsTimingFunction> Create(int steps, bool stepsAtStart); | |
ajuma
2014/02/21 19:05:08
nit: steps_at_start
| |
60 virtual ~StepsTimingFunction(); | |
61 | |
62 virtual float GetValue(double time) const OVERRIDE; | |
63 virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE; | |
64 virtual void Range(float* min, float* max) const OVERRIDE; | |
65 | |
66 protected: | |
67 StepsTimingFunction(int steps, bool stepsAtStart); | |
ajuma
2014/02/21 19:05:08
nit: steps_at_start
| |
68 | |
69 int steps_; | |
70 bool stepsAtStart_; | |
ajuma
2014/02/21 19:05:08
nit: steps_at_start_
| |
71 | |
72 private: | |
73 DISALLOW_ASSIGN(StepsTimingFunction); | |
74 }; | |
75 | |
57 class CC_EXPORT EaseTimingFunction { | 76 class CC_EXPORT EaseTimingFunction { |
58 public: | 77 public: |
59 static scoped_ptr<TimingFunction> Create(); | 78 static scoped_ptr<TimingFunction> Create(); |
60 | 79 |
61 private: | 80 private: |
62 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseTimingFunction); | 81 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseTimingFunction); |
63 }; | 82 }; |
64 | 83 |
65 class CC_EXPORT EaseInTimingFunction { | 84 class CC_EXPORT EaseInTimingFunction { |
66 public: | 85 public: |
(...skipping 15 matching lines...) Expand all Loading... | |
82 public: | 101 public: |
83 static scoped_ptr<TimingFunction> Create(); | 102 static scoped_ptr<TimingFunction> Create(); |
84 | 103 |
85 private: | 104 private: |
86 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction); | 105 DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction); |
87 }; | 106 }; |
88 | 107 |
89 } // namespace cc | 108 } // namespace cc |
90 | 109 |
91 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ | 110 #endif // CC_ANIMATION_TIMING_FUNCTION_H_ |
OLD | NEW |