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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_unittest.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply code review comments Created 8 years, 1 month 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
Index: webkit/compositor_bindings/web_layer_tree_view_unittest.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_unittest.cc b/webkit/compositor_bindings/web_layer_tree_view_unittest.cc
index 3d40bdef989a184a19c9467b703a9cc2e77aa8b8..06b649915fe7c725bc3b51ddbb66f9d1ad130d23 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_unittest.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_unittest.cc
@@ -46,7 +46,12 @@ public:
initializeCompositor();
m_rootLayer.reset(new WebLayerImpl);
m_view.reset(new WebLayerTreeViewImpl(client()));
- ASSERT_TRUE(m_view->initialize(WebLayerTreeView::Settings()));
+ scoped_ptr<cc::Thread> implCCThread(NULL);
+ if (m_implThread)
+ implCCThread = cc::ThreadImpl::createForDifferentThread(
+ m_implThread->message_loop_proxy());
+ ASSERT_TRUE(m_view->initialize(WebLayerTreeView::Settings(),
+ implCCThread.Pass()));
m_view->setRootLayer(*m_rootLayer);
m_view->setSurfaceReady();
}
@@ -62,6 +67,7 @@ public:
protected:
scoped_ptr<WebLayer> m_rootLayer;
scoped_ptr<WebLayerTreeViewImpl> m_view;
+ scoped_ptr<base::Thread> m_implThread;
};
class WebLayerTreeViewSingleThreadTest : public WebLayerTreeViewTestBase {
@@ -87,7 +93,6 @@ class WebLayerTreeViewThreadedTest : public WebLayerTreeViewTestBase {
protected:
virtual ~WebLayerTreeViewThreadedTest()
{
- cc::Proxy::setImplThread(0);
}
void composite()
@@ -105,8 +110,6 @@ protected:
{
m_implThread.reset(new base::Thread("ThreadedTest"));
ASSERT_TRUE(m_implThread->Start());
- m_implCCThread = cc::ThreadImpl::createForDifferentThread(m_implThread->message_loop_proxy());
- cc::Proxy::setImplThread(m_implCCThread.get());
}
virtual WebLayerTreeViewClient* client() OVERRIDE
@@ -115,8 +118,6 @@ protected:
}
MockWebLayerTreeViewClientForThreadedTests m_client;
- scoped_ptr<base::Thread> m_implThread;
- scoped_ptr<cc::Thread> m_implCCThread;
base::CancelableClosure m_timeout;
};
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.cc ('k') | webkit/compositor_bindings/web_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698