Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: cc/animation/timing_function.h

Issue 809523004: Define step timing function for the cc animation framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused enum Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/animation/keyframed_animation_curve_unittest.cc ('k') | cc/animation/timing_function.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « cc/animation/keyframed_animation_curve_unittest.cc ('k') | cc/animation/timing_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698