diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 22:55:35 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 22:55:35 +0000 |
commit | ea3f5cf79a8e5d9cd9825bcbc71d448534350135 (patch) | |
tree | f06dd247dde9b369b8f525495826e536c2b01809 /chrome/common/animation.cc | |
parent | c92913977f17839db50ddd561c1e7fa5a145bd3c (diff) | |
download | chromium_src-ea3f5cf79a8e5d9cd9825bcbc71d448534350135.zip chromium_src-ea3f5cf79a8e5d9cd9825bcbc71d448534350135.tar.gz chromium_src-ea3f5cf79a8e5d9cd9825bcbc71d448534350135.tar.bz2 |
Fix throb animation - a change to Animation::Start meant that Run() in a derived class was never being called. Throb animation depended on this.
BUG=3516
Review URL: http://codereview.chromium.org/8896
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/animation.cc')
-rw-r--r-- | chrome/common/animation.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/common/animation.cc b/chrome/common/animation.cc index bf69812..315f9f5 100644 --- a/chrome/common/animation.cc +++ b/chrome/common/animation.cc @@ -97,7 +97,7 @@ void Animation::SetDuration(int duration) { current_iteration_ = 0; } -void Animation::Run() { +void Animation::Step() { state_ = static_cast<double>(++current_iteration_) / iteration_count_; if (state_ >= 1.0) @@ -111,6 +111,10 @@ void Animation::Run() { Stop(); } +void Animation::Run() { + Step(); +} + int Animation::CalculateInterval(int frame_rate) { int timer_interval = 1000 / frame_rate; if (timer_interval < 10) |