Index: cc/test/layer_tree_test_common.cc |
diff --git a/cc/test/layer_tree_test_common.cc b/cc/test/layer_tree_test_common.cc |
index ebc726cf82f286e7af137ee06151915c3b6f3529..29e81e8bd1a0edbf1ce59a5821fb2ac0630f9d31 100644 |
--- a/cc/test/layer_tree_test_common.cc |
+++ b/cc/test/layer_tree_test_common.cc |
@@ -5,6 +5,7 @@ |
#include "cc/test/layer_tree_test_common.h" |
#include "cc/active_animation.h" |
+#include "cc/animation_registrar.h" |
#include "cc/content_layer.h" |
#include "cc/font_atlas.h" |
#include "cc/input_handler.h" |
@@ -73,7 +74,15 @@ void MockLayerTreeHostImpl::animateLayers(base::TimeTicks monotonicTime, base::T |
{ |
m_testHooks->willAnimateLayers(this, monotonicTime); |
LayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime); |
- m_testHooks->animateLayers(this, monotonicTime); |
+ bool hasUnfinishedAnimation = false; |
+ AnimationRegistrar::AnimationControllerMap::const_iterator iter = activeAnimationControllers().begin(); |
+ for (; iter != activeAnimationControllers().end(); ++iter) { |
+ if (iter->second->hasActiveAnimation()) { |
+ hasUnfinishedAnimation = true; |
+ break; |
+ } |
+ } |
+ m_testHooks->animateLayers(this, monotonicTime, hasUnfinishedAnimation); |
} |
base::TimeDelta MockLayerTreeHostImpl::lowFrequencyAnimationInterval() const |
@@ -103,12 +112,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) |
@@ -279,11 +282,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); |
@@ -411,14 +409,6 @@ void ThreadedTest::dispatchComposite() |
m_layerTreeHost->composite(); |
} |
-void ThreadedTest::dispatchDidAddAnimation() |
-{ |
- DCHECK(!proxy() || proxy()->isMainThread()); |
- |
- if (m_layerTreeHost.get()) |
- m_layerTreeHost->didAddAnimation(); |
-} |
- |
void ThreadedTest::runTest(bool threaded) |
{ |
if (threaded) { |