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

Side by Side Diff: cc/test/layer_tree_test.h

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: android-build Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_LAYER_TREE_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_
6 #define CC_TEST_LAYER_TREE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_TEST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/animation/animation_delegate.h" 10 #include "cc/animation/animation_delegate.h"
11 #include "cc/test/proxy_impl_for_test.h"
12 #include "cc/test/proxy_main_for_test.h"
13 #include "cc/test/remote_proto_channel_bridge.h" 11 #include "cc/test/remote_proto_channel_bridge.h"
14 #include "cc/test/test_hooks.h" 12 #include "cc/test/test_hooks.h"
15 #include "cc/trees/layer_tree_host.h" 13 #include "cc/trees/layer_tree_host.h"
16 #include "cc/trees/layer_tree_host_impl.h" 14 #include "cc/trees/layer_tree_host_impl.h"
17 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
18 16
19 namespace cc { 17 namespace cc {
20 class AnimationPlayer; 18 class AnimationPlayer;
21 class FakeExternalBeginFrameSource; 19 class FakeExternalBeginFrameSource;
22 class FakeLayerTreeHostClient; 20 class FakeLayerTreeHostClient;
23 class FakeOutputSurface; 21 class FakeOutputSurface;
24 class LayerImpl; 22 class LayerImpl;
25 class LayerTreeHost; 23 class LayerTreeHost;
26 class LayerTreeHostForTesting; 24 class LayerTreeHostForTesting;
27 class LayerTreeHostClient; 25 class LayerTreeHostClient;
28 class LayerTreeHostImpl; 26 class LayerTreeHostImpl;
27 class ProxyImpl;
28 class ProxyMain;
29 class RemoteChannelImplForTest; 29 class RemoteChannelImplForTest;
30 class TestContextProvider; 30 class TestContextProvider;
31 class TestGpuMemoryBufferManager; 31 class TestGpuMemoryBufferManager;
32 class TestTaskGraphRunner; 32 class TestTaskGraphRunner;
33 class TestWebGraphicsContext3D; 33 class TestWebGraphicsContext3D;
34 class ThreadedChannelForTest;
35 34
36 // Creates the virtual viewport layer hierarchy under the given root_layer. 35 // Creates the virtual viewport layer hierarchy under the given root_layer.
37 // Convenient overload of the method below that creates a scrolling layer as 36 // Convenient overload of the method below that creates a scrolling layer as
38 // the outer viewport scroll layer. 37 // the outer viewport scroll layer.
39 void CreateVirtualViewportLayers(Layer* root_layer, 38 void CreateVirtualViewportLayers(Layer* root_layer,
40 const gfx::Size& inner_bounds, 39 const gfx::Size& inner_bounds,
41 const gfx::Size& outer_bounds, 40 const gfx::Size& outer_bounds,
42 const gfx::Size& scroll_bounds, 41 const gfx::Size& scroll_bounds,
43 LayerTreeHost* host); 42 LayerTreeHost* host);
44 43
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 LayerTreeHost* layer_tree_host(); 147 LayerTreeHost* layer_tree_host();
149 LayerTreeHost* remote_client_layer_tree_host(); 148 LayerTreeHost* remote_client_layer_tree_host();
150 bool delegating_renderer() const { return delegating_renderer_; } 149 bool delegating_renderer() const { return delegating_renderer_; }
151 SharedBitmapManager* shared_bitmap_manager() const { 150 SharedBitmapManager* shared_bitmap_manager() const {
152 return shared_bitmap_manager_.get(); 151 return shared_bitmap_manager_.get();
153 } 152 }
154 TestGpuMemoryBufferManager* gpu_memory_buffer_manager() { 153 TestGpuMemoryBufferManager* gpu_memory_buffer_manager() {
155 return gpu_memory_buffer_manager_.get(); 154 return gpu_memory_buffer_manager_.get();
156 } 155 }
157 156
158 // Use these only for tests in threaded or remote mode.
159 ProxyMainForTest* GetProxyMainForTest() const;
160 ProxyImplForTest* GetProxyImplForTest() const;
161
162 // Use this only for tests in threaded mode.
163 ThreadedChannelForTest* GetThreadedChannelForTest() const;
164
165 // Use this only for tests in remote mode.
166 RemoteChannelImplForTest* GetRemoteChannelImplForTest() const;
167
168 void DestroyLayerTreeHost(); 157 void DestroyLayerTreeHost();
169 void DestroyRemoteClientHost() override; 158 void DestroyRemoteClientHost() override;
170 159
171 void CreateRemoteClientHost( 160 void CreateRemoteClientHost(
172 const proto::CompositorMessageToImpl& proto) override; 161 const proto::CompositorMessageToImpl& proto) override;
173 162
174 // By default, output surface recreation is synchronous. 163 // By default, output surface recreation is synchronous.
175 void RequestNewOutputSurface() override; 164 void RequestNewOutputSurface() override;
176 // Override this for pixel tests, where you need a real output surface, or 165 // Override this for pixel tests, where you need a real output surface, or
177 // if you want to control the output surface used for drawing. 166 // if you want to control the output surface used for drawing.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 259 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
271 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 260 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
272 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 261 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
273 262
274 // Some tests want to control when notify ready for activation occurs, 263 // Some tests want to control when notify ready for activation occurs,
275 // but this is not supported in the single-threaded case. 264 // but this is not supported in the single-threaded case.
276 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ 265 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \
277 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 266 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
278 267
279 #endif // CC_TEST_LAYER_TREE_TEST_H_ 268 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/layer_tree_test.cc » ('j') | cc/test/layer_tree_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698