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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(); | 184 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(); |
185 | 185 |
186 TestWebGraphicsContext3D* TestContext(); | 186 TestWebGraphicsContext3D* TestContext(); |
187 | 187 |
188 TestGpuMemoryBufferManager* GetTestGpuMemoryBufferManager() { | 188 TestGpuMemoryBufferManager* GetTestGpuMemoryBufferManager() { |
189 return gpu_memory_buffer_manager_.get(); | 189 return gpu_memory_buffer_manager_.get(); |
190 } | 190 } |
191 | 191 |
192 bool IsRemoteTest() const; | 192 bool IsRemoteTest() const; |
193 | 193 |
| 194 static gfx::Vector2dF ScrollDelta(LayerImpl* layer_impl) { |
| 195 if (layer_impl->IsActive()) |
| 196 return gfx::Vector2dF(layer_impl->synced_scroll_offset()->Delta().x(), |
| 197 layer_impl->synced_scroll_offset()->Delta().y()); |
| 198 else |
| 199 return gfx::Vector2dF( |
| 200 layer_impl->synced_scroll_offset()->PendingDelta().get().x(), |
| 201 layer_impl->synced_scroll_offset()->PendingDelta().get().y()); |
| 202 } |
| 203 |
194 private: | 204 private: |
195 LayerTreeSettings settings_; | 205 LayerTreeSettings settings_; |
196 LayerSettings layer_settings_; | 206 LayerSettings layer_settings_; |
197 | 207 |
198 CompositorMode mode_; | 208 CompositorMode mode_; |
199 | 209 |
200 scoped_ptr<LayerTreeHostClientForTesting> client_; | 210 scoped_ptr<LayerTreeHostClientForTesting> client_; |
201 scoped_ptr<LayerTreeHost> layer_tree_host_; | 211 scoped_ptr<LayerTreeHost> layer_tree_host_; |
202 | 212 |
203 // The LayerTreeHost created by the cc embedder on the client in remote mode. | 213 // The LayerTreeHost created by the cc embedder on the client in remote mode. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 290 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
281 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 291 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
282 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 292 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
283 | 293 |
284 // Some tests want to control when notify ready for activation occurs, | 294 // Some tests want to control when notify ready for activation occurs, |
285 // but this is not supported in the single-threaded case. | 295 // but this is not supported in the single-threaded case. |
286 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ | 296 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ |
287 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 297 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
288 | 298 |
289 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 299 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
OLD | NEW |