Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1662)

Unified Diff: cc/test/layer_tree_test_common.cc

Issue 11491003: Revert 171714 - Use an auxiliary list of animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dd40f136ba16c8fb8bf212b778303d2b9a83b4e4..bfa15dd91d64ca0269a67b582a8a5b104be35942 100644
--- a/cc/test/layer_tree_test_common.cc
+++ b/cc/test/layer_tree_test_common.cc
@@ -156,6 +156,12 @@ 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)
@@ -163,12 +169,6 @@ 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
@@ -335,6 +335,11 @@ 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);
@@ -464,6 +469,17 @@ 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) {
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698