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

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: 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
Index: cc/animation/timing_function.h
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index 69d1cc9fb5c43203cb0f79949adb3415fc216a2a..5ee9e9534a4f39b88d01f3fcc74bcf2132792585 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -81,6 +81,30 @@ class CC_EXPORT EaseInOutTimingFunction {
DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction);
};
+class CC_EXPORT StepsTimingFunction : public TimingFunction {
+ public:
+ 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
+
+ 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_

Powered by Google App Engine
This is Rietveld 408576698