OLD | NEW |
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" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 // By default, output surface recreation is synchronous. | 216 // By default, output surface recreation is synchronous. |
217 void RequestNewOutputSurface() override; | 217 void RequestNewOutputSurface() override; |
218 // Override this for pixel tests, where you need a real output surface. | 218 // Override this for pixel tests, where you need a real output surface. |
219 virtual scoped_ptr<OutputSurface> CreateOutputSurface(); | 219 virtual scoped_ptr<OutputSurface> CreateOutputSurface(); |
220 // Override this for unit tests, which should not produce pixel output. | 220 // Override this for unit tests, which should not produce pixel output. |
221 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(); | 221 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(); |
222 | 222 |
223 TestWebGraphicsContext3D* TestContext(); | 223 TestWebGraphicsContext3D* TestContext(); |
224 | 224 |
| 225 TestGpuMemoryBufferManager* GetTestGpuMemoryBufferManager() { |
| 226 return gpu_memory_buffer_manager_.get(); |
| 227 } |
| 228 |
225 private: | 229 private: |
226 LayerTreeSettings settings_; | 230 LayerTreeSettings settings_; |
227 LayerSettings layer_settings_; | 231 LayerSettings layer_settings_; |
228 | 232 |
229 scoped_ptr<LayerTreeHostClientForTesting> client_; | 233 scoped_ptr<LayerTreeHostClientForTesting> client_; |
230 scoped_ptr<LayerTreeHost> layer_tree_host_; | 234 scoped_ptr<LayerTreeHost> layer_tree_host_; |
231 FakeOutputSurface* output_surface_; | 235 FakeOutputSurface* output_surface_; |
232 FakeExternalBeginFrameSource* external_begin_frame_source_; | 236 FakeExternalBeginFrameSource* external_begin_frame_source_; |
233 | 237 |
234 bool beginning_; | 238 bool beginning_; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 389 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
386 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 390 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
387 | 391 |
388 // Some tests want to control when notify ready for activation occurs, | 392 // Some tests want to control when notify ready for activation occurs, |
389 // but this is not supported in the single-threaded case. | 393 // but this is not supported in the single-threaded case. |
390 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ | 394 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ |
391 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ | 395 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ |
392 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 396 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
393 | 397 |
394 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 398 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
OLD | NEW |