summaryrefslogtreecommitdiffstats
path: root/cc/test/animation_test_common.h
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-08 17:01:18 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-08 17:01:18 +0000
commitdf1ec1ac79676fbc12181317c6febd199ad09728 (patch)
treea04f90c142fc1e9d4e82e7e345250bb8daa06385 /cc/test/animation_test_common.h
parent9b39fe5ba8173f8e4a505149440069a546f6107a (diff)
downloadchromium_src-df1ec1ac79676fbc12181317c6febd199ad09728.zip
chromium_src-df1ec1ac79676fbc12181317c6febd199ad09728.tar.gz
chromium_src-df1ec1ac79676fbc12181317c6febd199ad09728.tar.bz2
Revert 171714 - Use an auxiliary list of animation controllers.
> With this patch we accomplish the following: > 1. layer animation controllers are ref counted (so they can be shared by the two impl trees) > 2. the layer tree hosts now own a list of active animation controllers. This allows for a couple of nice things > __a. Ticking the animation controllers no longer requires a tree walk > __b. We will be able to support ticking of animation controllers for layers that are not yet added to the layer tree. (Support coming in a future patch). > 3. animation controllers register and unregister themselves from their respective layer tree host's list when they have an animation to tick. > > BUG=162111 > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171714 TBR=vollick@chromium.org BUG= Review URL: https://codereview.chromium.org/11491003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/animation_test_common.h')
-rw-r--r--cc/test/animation_test_common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index a45e9f0..6ee0cdd 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -60,6 +60,23 @@ private:
float m_to;
};
+class FakeLayerAnimationControllerClient : public cc::LayerAnimationControllerClient {
+public:
+ FakeLayerAnimationControllerClient();
+ virtual ~FakeLayerAnimationControllerClient();
+
+ // LayerAnimationControllerClient implementation
+ virtual int id() const OVERRIDE;
+ virtual void setOpacityFromAnimation(float) OVERRIDE;
+ virtual float opacity() const OVERRIDE;
+ virtual void setTransformFromAnimation(const gfx::Transform&) OVERRIDE;
+ virtual const gfx::Transform& transform() const OVERRIDE;
+
+private:
+ float m_opacity;
+ gfx::Transform m_transform;
+};
+
int addOpacityTransitionToController(cc::LayerAnimationController&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
int addAnimatedTransformToController(cc::LayerAnimationController&, double duration, int deltaX, int deltaY);