Chromium Code Reviews| Index: cc/test/layer_tree_test.h |
| diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h |
| index ea509d5f81e12cc3781c62375d6c196cbd912dcf..3afe4d3ef0457d82841e61a2f9d9c1d37fc110c3 100644 |
| --- a/cc/test/layer_tree_test.h |
| +++ b/cc/test/layer_tree_test.h |
| @@ -11,6 +11,7 @@ |
| #include "cc/layers/layer_settings.h" |
| #include "cc/test/proxy_impl_for_test.h" |
| #include "cc/test/proxy_main_for_test.h" |
| +#include "cc/test/remote_proto_channel_bridge.h" |
| #include "cc/test/test_hooks.h" |
| #include "cc/trees/layer_tree_host.h" |
| #include "cc/trees/layer_tree_host_impl.h" |
| @@ -25,10 +26,14 @@ class LayerImpl; |
| class LayerTreeHost; |
| class LayerTreeHostClient; |
| class LayerTreeHostImpl; |
| +class RemoteChannelHostClientForTesting; |
| +class RemoteChannelHostForTesting; |
| +class RemoteChannelImplForTest; |
| class TestContextProvider; |
| class TestGpuMemoryBufferManager; |
| class TestTaskGraphRunner; |
| class TestWebGraphicsContext3D; |
| +class ThreadedChannelForTest; |
| // Creates the virtual viewport layer hierarchy under the given root_layer. |
| // Convenient overload of the method below that creates a scrolling layer as |
| @@ -129,7 +134,6 @@ class LayerTreeTest : public testing::Test, public TestHooks { |
| virtual void BeginTest() = 0; |
| virtual void SetupTree(); |
| - // TODO(khushalsagar): Add mode for running remote channel tests. |
| virtual void RunTest(CompositorMode mode, bool delegating_renderer); |
| bool HasImplThread() const { return !!impl_thread_; } |
| @@ -158,13 +162,18 @@ class LayerTreeTest : public testing::Test, public TestHooks { |
| FakeOutputSurface* output_surface() { return output_surface_; } |
| int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const; |
| - // Use these only for ProxyMain tests in threaded mode. |
| - // TODO(khushalsagar): Update these when adding support for remote channel |
| - // tests. |
| + // Use these only for tests in threaded or remote mode. |
| ProxyMainForTest* GetProxyMainForTest() const; |
| ProxyImplForTest* GetProxyImplForTest() const; |
| + // Use this only for tests in threaded mode. |
| + ThreadedChannelForTest* GetThreadedChannelForTest() const; |
| + |
| + // Use this only for tests in remote mode. |
| + RemoteChannelImplForTest* GetRemoteChannelImplForTest() const; |
| + |
| void DestroyLayerTreeHost(); |
| + void DestroyRemoteChannelHost(); |
| // By default, output surface recreation is synchronous. |
| void RequestNewOutputSurface() override; |
| @@ -179,7 +188,11 @@ class LayerTreeTest : public testing::Test, public TestHooks { |
| return gpu_memory_buffer_manager_.get(); |
| } |
| + bool IsRemoteTest() const; |
| + |
| private: |
| + void DidShutdown() override; |
| + |
| LayerTreeSettings settings_; |
| LayerSettings layer_settings_; |
| @@ -187,8 +200,11 @@ class LayerTreeTest : public testing::Test, public TestHooks { |
| scoped_ptr<LayerTreeHostClientForTesting> client_; |
| scoped_ptr<LayerTreeHost> layer_tree_host_; |
| + scoped_ptr<RemoteChannelHostClientForTesting> remote_channel_host_client_; |
| + scoped_ptr<RemoteChannelHostForTesting> remote_channel_host_for_testing_; |
| FakeOutputSurface* output_surface_; |
| FakeExternalBeginFrameSource* external_begin_frame_source_; |
| + RemoteProtoChannelBridge remote_proto_channel_bridge_; |
|
vmpstr
2016/01/07 19:08:12
What's this?
Khushal
2016/01/08 21:17:19
Its just a helper class to send protos directly be
|
| bool beginning_; |
| bool end_when_begin_returns_; |
| @@ -246,6 +262,13 @@ class LayerTreeTest : public testing::Test, public TestHooks { |
| MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
| +// The Remote mode tests don't need to run for delegated renderer. |
| +#define REMOTE_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ |
| + TEST_F(TEST_FIXTURE_NAME, RunRemote_DirectRenderer) { \ |
| + RunTest(CompositorMode::Remote, false); \ |
| + } \ |
| + class RemoteDirectImplNeedsSemicolon##TEST_FIXTURE_NAME {} |
| + |
| #define SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ |
| SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) |