summaryrefslogtreecommitdiffstats
path: root/cc/test/animation_test_common.cc
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 00:11:34 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 00:11:34 +0000
commitde4afb5eaff3e756cc13d915532402c651302a32 (patch)
treed7517e1363c8cf3698dc1fd08af4623705a4263d /cc/test/animation_test_common.cc
parent8f95c562479b3be9776e77b597d72b464bb447a5 (diff)
downloadchromium_src-de4afb5eaff3e756cc13d915532402c651302a32.zip
chromium_src-de4afb5eaff3e756cc13d915532402c651302a32.tar.gz
chromium_src-de4afb5eaff3e756cc13d915532402c651302a32.tar.bz2
Ref count layer 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. R=nduca@chromium.org,enne@chromium.org BUG=162111 Review URL: https://chromiumcodereview.appspot.com/11598005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/animation_test_common.cc')
-rw-r--r--cc/test/animation_test_common.cc23
1 files changed, 4 insertions, 19 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index 9920751..258a266 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -146,40 +146,25 @@ float FakeFloatTransition::getValue(double time) const
return (1 - time) * m_from + time * m_to;
}
-FakeLayerAnimationControllerClient::FakeLayerAnimationControllerClient()
+FakeLayerAnimationValueObserver::FakeLayerAnimationValueObserver()
: m_opacity(0)
{
}
-FakeLayerAnimationControllerClient::~FakeLayerAnimationControllerClient()
+FakeLayerAnimationValueObserver::~FakeLayerAnimationValueObserver()
{
}
-int FakeLayerAnimationControllerClient::id() const
-{
- return 0;
-}
-
-void FakeLayerAnimationControllerClient::setOpacityFromAnimation(float opacity)
+void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity)
{
m_opacity = opacity;
}
-float FakeLayerAnimationControllerClient::opacity() const
-{
- return m_opacity;
-}
-
-void FakeLayerAnimationControllerClient::setTransformFromAnimation(const gfx::Transform& transform)
+void FakeLayerAnimationValueObserver::OnTransformAnimated(const gfx::Transform& transform)
{
m_transform = transform;
}
-const gfx::Transform& FakeLayerAnimationControllerClient::transform() const
-{
- return m_transform;
-}
-
scoped_ptr<cc::AnimationCurve> FakeFloatTransition::clone() const
{
return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::AnimationCurve>();