summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/animation_test_common.cc34
-rw-r--r--cc/test/animation_test_common.h17
-rw-r--r--cc/test/fake_proxy.h1
-rw-r--r--cc/test/layer_tree_test_common.cc28
-rw-r--r--cc/test/layer_tree_test_common.h1
5 files changed, 6 insertions, 75 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index fd6ba2d..73e0960 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -150,40 +150,6 @@ float FakeFloatTransition::getValue(double time) const
return (1 - time) * m_from + time * m_to;
}
-FakeLayerAnimationControllerClient::FakeLayerAnimationControllerClient()
- : m_opacity(0)
-{
-}
-
-FakeLayerAnimationControllerClient::~FakeLayerAnimationControllerClient()
-{
-}
-
-int FakeLayerAnimationControllerClient::id() const
-{
- return 0;
-}
-
-void FakeLayerAnimationControllerClient::setOpacityFromAnimation(float opacity)
-{
- m_opacity = opacity;
-}
-
-float FakeLayerAnimationControllerClient::opacity() const
-{
- return m_opacity;
-}
-
-void FakeLayerAnimationControllerClient::setTransformFromAnimation(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>();
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index d293206..c136f41 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -60,23 +60,6 @@ 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);
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index c89f120..a87310e 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -30,7 +30,6 @@ public:
virtual void setNeedsCommit() OVERRIDE { }
virtual void setNeedsRedraw() OVERRIDE { }
virtual void setDeferCommits(bool) OVERRIDE { }
- virtual void didAddAnimation() OVERRIDE { }
virtual bool commitRequested() const OVERRIDE;
virtual void start() OVERRIDE { }
virtual void stop() OVERRIDE { }
diff --git a/cc/test/layer_tree_test_common.cc b/cc/test/layer_tree_test_common.cc
index 35bdab7..a1b04e9 100644
--- a/cc/test/layer_tree_test_common.cc
+++ b/cc/test/layer_tree_test_common.cc
@@ -164,12 +164,6 @@ public:
return MockLayerTreeHostImpl::create(m_testHooks, settings(), client, proxy()).PassAs<cc::LayerTreeHostImpl>();
}
- virtual void didAddAnimation() OVERRIDE
- {
- LayerTreeHost::didAddAnimation();
- m_testHooks->didAddAnimation();
- }
-
virtual void setNeedsCommit() OVERRIDE
{
if (!m_testStarted)
@@ -177,6 +171,12 @@ public:
LayerTreeHost::setNeedsCommit();
}
+ virtual void DidActivateAnimationController(cc::LayerAnimationController* controller) OVERRIDE
+ {
+ LayerTreeHost::DidActivateAnimationController(controller);
+ m_testHooks->didAddAnimation();
+ }
+
void setTestStarted(bool started) { m_testStarted = started; }
virtual void didDeferCommit() OVERRIDE
@@ -343,11 +343,6 @@ void ThreadedTest::postSetVisibleToMainThread(bool visible)
m_mainThreadProxy->postTask(FROM_HERE, base::Bind(&ThreadedTest::dispatchSetVisible, base::Unretained(this), visible));
}
-void ThreadedTest::postDidAddAnimationToMainThread()
-{
- m_mainThreadProxy->postTask(FROM_HERE, base::Bind(&ThreadedTest::dispatchDidAddAnimation, base::Unretained(this)));
-}
-
void ThreadedTest::doBeginTest()
{
m_client = ThreadedMockLayerTreeHostClient::create(this);
@@ -477,17 +472,6 @@ void ThreadedTest::dispatchComposite()
m_layerTreeHost->composite();
}
-void ThreadedTest::dispatchDidAddAnimation()
-{
- DCHECK(!proxy() || proxy()->isMainThread());
-
- if (m_finished)
- return;
-
- if (m_layerTreeHost.get())
- m_layerTreeHost->didAddAnimation();
-}
-
void ThreadedTest::runTest(bool threaded)
{
if (threaded) {
diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
index 4403326..e85927d 100644
--- a/cc/test/layer_tree_test_common.h
+++ b/cc/test/layer_tree_test_common.h
@@ -84,7 +84,6 @@ public:
void postAcquireLayerTextures();
void postSetNeedsRedrawToMainThread();
void postSetVisibleToMainThread(bool visible);
- void postDidAddAnimationToMainThread();
void doBeginTest();
void timeout();