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

Unified Diff: cc/test/layer_tree_test_common.h

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
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test_common.h
diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
index 0e02cfabc0b26d3d014036982cd50a244ca37cd9..64fee75a5db31abc6f658711f86c35a513425b7c 100644
--- a/cc/test/layer_tree_test_common.h
+++ b/cc/test/layer_tree_test_common.h
@@ -114,7 +114,8 @@ protected:
virtual void runTest(bool threaded);
- cc::Thread* implThread() { return m_implCCThread.get(); }
+ cc::Thread* implThread() { return proxy() ? proxy()->implThread() : 0; }
+ cc::Proxy* proxy() const { return m_layerTreeHost ? m_layerTreeHost->proxy() : 0; }
cc::LayerTreeSettings m_settings;
scoped_ptr<MockLayerImplTreeHostClient> m_client;
@@ -132,7 +133,6 @@ private:
bool m_started;
scoped_ptr<cc::Thread> m_mainCCThread;
- scoped_ptr<cc::Thread> m_implCCThread;
scoped_ptr<base::Thread> m_implThread;
base::CancelableClosure m_timeout;
};
@@ -148,7 +148,7 @@ public:
// Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
class MockLayerTreeHostImpl : public cc::LayerTreeHostImpl {
public:
- static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*);
+ static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
virtual void beginCommit() OVERRIDE;
virtual void commitComplete() OVERRIDE;
@@ -164,7 +164,7 @@ protected:
virtual base::TimeDelta lowFrequencyAnimationInterval() const OVERRIDE;
private:
- MockLayerTreeHostImpl(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*);
+ MockLayerTreeHostImpl(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
TestHooks* m_testHooks;
};
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698