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

Unified Diff: cc/animation/animation.h

Issue 220403002: Revert "Handle direction control in compositor Animations" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 | « AUTHORS ('k') | cc/animation/animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation.h
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index 56f1ff77774cfaaa79a67badec53982476884d9b..f996c38bbb3dd410bad69189955c8533a2b77e00 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -48,8 +48,6 @@ class CC_EXPORT Animation {
TargetPropertyEnumSize
};
- enum Direction { Normal, Reverse, Alternate, AlternateReverse };
-
static scoped_ptr<Animation> Create(scoped_ptr<AnimationCurve> curve,
int animation_id,
int group_id,
@@ -80,8 +78,12 @@ class CC_EXPORT Animation {
void Suspend(double monotonic_time);
void Resume(double monotonic_time);
- Direction direction() { return direction_; }
- void set_direction(Direction direction) { direction_ = direction; }
+ // 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;
+ }
bool IsFinishedAt(double monotonic_time) const;
bool is_finished() const {
@@ -148,7 +150,7 @@ class CC_EXPORT Animation {
RunState run_state_;
int iterations_;
double start_time_;
- Direction direction_;
+ bool alternates_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
« no previous file with comments | « AUTHORS ('k') | cc/animation/animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698