diff options
author | vollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-23 00:21:58 +0000 |
---|---|---|
committer | vollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-23 00:21:58 +0000 |
commit | 5d86a110369304e81bc12d1cd4d2c65440f0be69 (patch) | |
tree | 3cae472f5087a99e18d729ef0bb14eaf040a4f6e /ui/compositor/layer_animation_sequence.h | |
parent | 3da6be89be3a6e9dd7c6843caaefc23b558f3209 (diff) | |
download | chromium_src-5d86a110369304e81bc12d1cd4d2c65440f0be69.zip chromium_src-5d86a110369304e81bc12d1cd4d2c65440f0be69.tar.gz chromium_src-5d86a110369304e81bc12d1cd4d2c65440f0be69.tar.bz2 |
Revert 157567 - Revert 156318 - I had originally tried to build upon http://codereview.chromium.org/10869066/, but the number of functions that needed to return (or needed to cope with) DestroyedType's was spiralling out of control and it seemed likely that a mistake would be made and bugs introduced. pkotwicz suggested I make the layer animator ref counted, and this seemed to be a much simpler and safer approach. This way, whenever we're in a LayerAnimator function that may notify observers, we create a scoped_refptr<LayerAnimator> for |this|. If the animator's owning layer gets deleted by an observer, then |this| will be safely destroyed when the function exits and the scoped_refptr falls out of scope.
BUG=147435
TEST=LayerAnimatorTest.ObserverDeletesAnimatorAfter[FinishingAnimation|StoppingAnimation|Scheduling|Aborted]
Review URL: https://chromiumcodereview.appspot.com/10919195
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/10942034
Review URL: https://codereview.chromium.org/10956055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor/layer_animation_sequence.h')
-rw-r--r-- | ui/compositor/layer_animation_sequence.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/compositor/layer_animation_sequence.h b/ui/compositor/layer_animation_sequence.h index 998dd9f..abd3694 100644 --- a/ui/compositor/layer_animation_sequence.h +++ b/ui/compositor/layer_animation_sequence.h @@ -36,9 +36,9 @@ class COMPOSITOR_EXPORT LayerAnimationSequence { // Updates the delegate to the appropriate value for |elapsed|, which is in // the range [0, Duration()]. If the animation is not aborted, it is - // guaranteed that Animate will be called with elapsed = Duration(). - // Returns true if a redraw is required. - bool Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); + // guaranteed that Animate will be called with elapsed = Duration(). Requests + // a redraw if it is required. + void Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); // Sets the target value to the value that would have been set had // the sequence completed. Does nothing if the sequence is cyclic. |