diff options
author | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-27 23:47:40 +0000 |
---|---|---|
committer | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-27 23:47:40 +0000 |
commit | 41512b041cfaf1705ec435295549f8bf2f1484c9 (patch) | |
tree | 468e4d74cdb66b8b1d36c1141d67566e77a2dd19 /cc/test/animation_test_common.h | |
parent | f37e941d37e68058b3709465c87c13c73af2420c (diff) | |
download | chromium_src-41512b041cfaf1705ec435295549f8bf2f1484c9.zip chromium_src-41512b041cfaf1705ec435295549f8bf2f1484c9.tar.gz chromium_src-41512b041cfaf1705ec435295549f8bf2f1484c9.tar.bz2 |
Allow animations with inactive observers to reach the Starting state
Currently, when a LayerAnimationController only has an observer in the
pending tree, we early-out from Animate and UpdateState in order to prevent
animating a layer before it's drawn.
However, this means that the position of a layer can change immediately
after tree activation (even before a draw), if an animation is started on
that layer. This means that tile priorities calculated by UpdateTilePriorites
before tree activation can immediately become stale.
This CL allows animations with only inactive observers to reach the Starting
state and get ticked at their starting point, but progress no further. This
means we still won't have running animations on layers before they're drawn.
However, this change means that if we ensure that animation always happens
before tree activation in each frame (in a follow-up CL), then the tile
priorities calculated during tree activation will still be valid when the
frame is drawn.
BUG=242966
Review URL: https://chromiumcodereview.appspot.com/15732013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/animation_test_common.h')
-rw-r--r-- | cc/test/animation_test_common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h index 4e5752c..cab2ccf 100644 --- a/cc/test/animation_test_common.h +++ b/cc/test/animation_test_common.h @@ -79,6 +79,12 @@ class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver { gfx::Transform transform_; }; +class FakeInactiveLayerAnimationValueObserver + : public FakeLayerAnimationValueObserver { + public: + virtual bool IsActive() const OVERRIDE; +}; + int AddOpacityTransitionToController(LayerAnimationController* controller, double duration, float start_opacity, |