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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/timing_function.h
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index 69d1cc9fb5c43203cb0f79949adb3415fc216a2a..95144a7cfd7f9d49f2aecac4d97151c3803d4c70 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -81,6 +81,28 @@ class CC_EXPORT EaseInOutTimingFunction {
DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction);
};
+class CC_EXPORT StepsTimingFunction : public TimingFunction {
+ public:
+ static scoped_ptr<StepsTimingFunction> Create(int steps,
+ float steps_start_offset);
+ ~StepsTimingFunction() override;
+
+ float GetValue(double t) const override;
+ scoped_ptr<TimingFunction> Clone() const override;
+
+ void Range(float* min, float* max) const override;
+ float Velocity(double time) const override;
+
+ protected:
+ StepsTimingFunction(int steps, float steps_start_offset);
+
+ private:
+ int steps_;
+ float steps_start_offset_;
+
+ DISALLOW_ASSIGN(StepsTimingFunction);
+};
+
} // namespace cc
#endif // CC_ANIMATION_TIMING_FUNCTION_H_
« 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