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

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: Rebase to 165064 Created 8 years, 2 months 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: 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 962764a909e5f736cfbb5cfedee830e33962a403..b0f277b1e47a3e66515119710a7795778aee5e08 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;
};

Powered by Google App Engine
This is Rietveld 408576698