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