diff options
author | samli@chromium.org <samli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 05:23:52 +0000 |
---|---|---|
committer | samli@chromium.org <samli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 05:25:16 +0000 |
commit | 3f05e4ab5c2f420cb8e6e863a3383c8e4cea615d (patch) | |
tree | e3a7029f5e098692f64436d1a9e0599b8385af98 /cc/animation/animation.h | |
parent | 5db452206ce2503815abe55878179b2399cc906a (diff) | |
download | chromium_src-3f05e4ab5c2f420cb8e6e863a3383c8e4cea615d.zip chromium_src-3f05e4ab5c2f420cb8e6e863a3383c8e4cea615d.tar.gz chromium_src-3f05e4ab5c2f420cb8e6e863a3383c8e4cea615d.tar.bz2 |
CC: Support playback rate in compositor animations
This adds support for a playback rate to be provided to a compositor
animation.
BUG=398330
Review URL: https://codereview.chromium.org/424973002
Cr-Commit-Position: refs/heads/master@{#290498}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation/animation.h')
-rw-r--r-- | cc/animation/animation.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/animation/animation.h b/cc/animation/animation.h index 508651d..aac6d7b 100644 --- a/cc/animation/animation.h +++ b/cc/animation/animation.h @@ -89,6 +89,11 @@ class CC_EXPORT Animation { Direction direction() { return direction_; } void set_direction(Direction direction) { direction_ = direction; } + double playback_rate() { return playback_rate_; } + void set_playback_rate(double playback_rate) { + playback_rate_ = playback_rate; + } + bool IsFinishedAt(base::TimeTicks monotonic_time) const; bool is_finished() const { return run_state_ == Finished || @@ -164,6 +169,7 @@ class CC_EXPORT Animation { double iterations_; base::TimeTicks start_time_; Direction direction_; + double playback_rate_; // 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 |