Chromium Code Reviews| Index: cc/animation/animation.h |
| diff --git a/cc/animation/animation.h b/cc/animation/animation.h |
| index f996c38bbb3dd410bad69189955c8533a2b77e00..a34d01b5e5680c993e951bec51e336418131ba55 100644 |
| --- a/cc/animation/animation.h |
| +++ b/cc/animation/animation.h |
| @@ -48,6 +48,8 @@ class CC_EXPORT Animation { |
| TargetPropertyEnumSize |
| }; |
| + enum Direction { Normal = 0, Reverse, Alternate, AlternateReverse }; |
|
ajuma
2014/03/04 19:02:38
Is the "= 0" needed? (The previous enum only needs
|
| + |
| static scoped_ptr<Animation> Create(scoped_ptr<AnimationCurve> curve, |
| int animation_id, |
| int group_id, |
| @@ -78,12 +80,8 @@ class CC_EXPORT Animation { |
| void Suspend(double monotonic_time); |
| void Resume(double monotonic_time); |
| - // If alternates_direction is true, on odd numbered iterations we reverse the |
| - // curve. |
| - bool alternates_direction() const { return alternates_direction_; } |
| - void set_alternates_direction(bool alternates) { |
| - alternates_direction_ = alternates; |
| - } |
| + Direction direction() { return direction_; } |
| + void set_direction(Direction direction) { direction_ = direction; } |
| bool IsFinishedAt(double monotonic_time) const; |
| bool is_finished() const { |
| @@ -150,7 +148,7 @@ class CC_EXPORT Animation { |
| RunState run_state_; |
| int iterations_; |
| double start_time_; |
| - bool alternates_direction_; |
| + Direction direction_; |
| // The time offset effectively pushes the start of the animation back in time. |
| // This is used for resuming paused animations -- an animation is added with a |