OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace base { | 27 namespace base { |
28 class MessageLoopProxy; | 28 class MessageLoopProxy; |
29 class RunLoop; | 29 class RunLoop; |
30 } | 30 } |
31 | 31 |
32 namespace cc { | 32 namespace cc { |
33 class ContextProvider; | 33 class ContextProvider; |
34 class Layer; | 34 class Layer; |
35 class LayerTreeDebugState; | 35 class LayerTreeDebugState; |
36 class LayerTreeHost; | 36 class LayerTreeHost; |
| 37 class LayerTreeSettings; |
37 class TestContextProvider; | 38 class TestContextProvider; |
38 } | 39 } |
39 | 40 |
40 namespace gfx { | 41 namespace gfx { |
41 class GLContext; | 42 class GLContext; |
42 class GLSurface; | 43 class GLSurface; |
43 class GLShareGroup; | 44 class GLShareGroup; |
44 class Point; | 45 class Point; |
45 class Rect; | 46 class Rect; |
46 class Size; | 47 class Size; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // Some tests expect pixel output, and they should pass false for | 297 // Some tests expect pixel output, and they should pass false for |
297 // |allow_test_contexts|. Most unit tests should pass true. Once this has been | 298 // |allow_test_contexts|. Most unit tests should pass true. Once this has been |
298 // called, the Initialize() and Terminate() methods should be used as normal. | 299 // called, the Initialize() and Terminate() methods should be used as normal. |
299 static void InitializeContextFactoryForTests(bool allow_test_contexts); | 300 static void InitializeContextFactoryForTests(bool allow_test_contexts); |
300 | 301 |
301 static void Initialize(); | 302 static void Initialize(); |
302 static bool WasInitializedWithThread(); | 303 static bool WasInitializedWithThread(); |
303 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop(); | 304 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop(); |
304 static void Terminate(); | 305 static void Terminate(); |
305 | 306 |
| 307 // Retreives the current LayerTreeSettings |
| 308 const cc::LayerTreeSettings& layer_tree_settings() const; |
| 309 |
306 // Schedules a redraw of the layer tree associated with this compositor. | 310 // Schedules a redraw of the layer tree associated with this compositor. |
307 void ScheduleDraw(); | 311 void ScheduleDraw(); |
308 | 312 |
309 // Sets the root of the layer tree drawn by this Compositor. The root layer | 313 // Sets the root of the layer tree drawn by this Compositor. The root layer |
310 // must have no parent. The compositor's root layer is reset if the root layer | 314 // must have no parent. The compositor's root layer is reset if the root layer |
311 // is destroyed. NULL can be passed to reset the root layer, in which case the | 315 // is destroyed. NULL can be passed to reset the root layer, in which case the |
312 // compositor will stop drawing anything. | 316 // compositor will stop drawing anything. |
313 // The Compositor does not own the root layer. | 317 // The Compositor does not own the root layer. |
314 const Layer* root_layer() const { return root_layer_; } | 318 const Layer* root_layer() const { return root_layer_; } |
315 Layer* root_layer() { return root_layer_; } | 319 Layer* root_layer() { return root_layer_; } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 bool disable_schedule_composite_; | 453 bool disable_schedule_composite_; |
450 | 454 |
451 CompositorLock* compositor_lock_; | 455 CompositorLock* compositor_lock_; |
452 | 456 |
453 DISALLOW_COPY_AND_ASSIGN(Compositor); | 457 DISALLOW_COPY_AND_ASSIGN(Compositor); |
454 }; | 458 }; |
455 | 459 |
456 } // namespace ui | 460 } // namespace ui |
457 | 461 |
458 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 462 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |