| 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..e7ed781dd9ea4f897b2cd9a1880e7753eaa74222 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,6 +26,9 @@ class LayerImpl;
|
| class LayerTreeHost;
|
| class LayerTreeHostClient;
|
| class LayerTreeHostImpl;
|
| +class RemoteChannelHostClientForTesting;
|
| +class RemoteChannelHostForTesting;
|
| +class RemoteChannelImplForTest;
|
| class TestContextProvider;
|
| class TestGpuMemoryBufferManager;
|
| class TestTaskGraphRunner;
|
| @@ -129,7 +133,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,12 +161,13 @@ 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 remote mode.
|
| + RemoteChannelImplForTest* GetRemoteChannelImplForTest() const;
|
| +
|
| void DestroyLayerTreeHost();
|
|
|
| // By default, output surface recreation is synchronous.
|
| @@ -173,12 +177,16 @@ class LayerTreeTest : public testing::Test, public TestHooks {
|
| // Override this for unit tests, which should not produce pixel output.
|
| virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface();
|
|
|
| + void DidShutdown() override;
|
| +
|
| TestWebGraphicsContext3D* TestContext();
|
|
|
| TestGpuMemoryBufferManager* GetTestGpuMemoryBufferManager() {
|
| return gpu_memory_buffer_manager_.get();
|
| }
|
|
|
| + bool IsRemoteTest() const;
|
| +
|
| private:
|
| LayerTreeSettings settings_;
|
| LayerSettings layer_settings_;
|
| @@ -187,8 +195,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_;
|
|
|
| bool beginning_;
|
| bool end_when_begin_returns_;
|
| @@ -246,6 +257,12 @@ 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)
|
|
|
| +#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)
|
|
|