Chromium Code Reviews| Index: cc/animation/timing_function.h |
| diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h |
| index cc979398e4b4b098ece44d57269c1e220605129b..b85ef505a0a1fb81c80e746a8a585c45a9c02787 100644 |
| --- a/cc/animation/timing_function.h |
| +++ b/cc/animation/timing_function.h |
| @@ -7,7 +7,8 @@ |
| #include "cc/animation/animation_curve.h" |
| #include "cc/base/cc_export.h" |
| -#include "ui/gfx/geometry/cubic_bezier.h" |
| +#include "ui/gfx/animation/cubic_bezier.h" |
| +#include "ui/gfx/animation/steps.h" |
| namespace cc { |
| @@ -53,6 +54,28 @@ class CC_EXPORT CubicBezierTimingFunction : public TimingFunction { |
| DISALLOW_ASSIGN(CubicBezierTimingFunction); |
| }; |
| +class CC_EXPORT StepsTimingFunction : public TimingFunction { |
| + public: |
| + static scoped_ptr<StepsTimingFunction> Create(int steps, bool steps_at_start); |
| + virtual ~StepsTimingFunction(); |
| + |
| + virtual float GetValue(double time) const OVERRIDE; |
| + virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE; |
| + virtual void Range(float* min, float* max) const OVERRIDE; |
| + // XXX: Should Velocity be a CubicBezierTimingFunction only? It seems to be |
| + // used only for ScrollOffsetAnimationCurve. Do ScrollOffsetAnimationCurve |
| + // with non bezier curves make sense? |
|
ajuma
2014/09/16 14:50:15
ScrollOffsetAnimationCurves with non-bezier curves
|
| + virtual float Velocity(double time) const OVERRIDE; |
| + |
| + protected: |
| + StepsTimingFunction(int steps, bool steps_at_start); |
| + |
| + gfx::Steps steps_; |
| + |
| + private: |
| + DISALLOW_ASSIGN(StepsTimingFunction); |
| +}; |
| + |
| class CC_EXPORT EaseTimingFunction { |
| public: |
| static scoped_ptr<TimingFunction> Create(); |