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_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 #include "third_party/skia/include/core/SkColor.h" | 42 #include "third_party/skia/include/core/SkColor.h" |
43 #include "ui/gfx/geometry/rect.h" | 43 #include "ui/gfx/geometry/rect.h" |
44 | 44 |
45 namespace gpu { | 45 namespace gpu { |
46 class GpuMemoryBufferManager; | 46 class GpuMemoryBufferManager; |
47 } | 47 } |
48 | 48 |
49 namespace cc { | 49 namespace cc { |
50 class AnimationRegistrar; | 50 class AnimationRegistrar; |
51 class BeginFrameSource; | 51 class BeginFrameSource; |
52 class CompositorMutator; | |
52 class HeadsUpDisplayLayer; | 53 class HeadsUpDisplayLayer; |
53 class Layer; | 54 class Layer; |
54 class LayerTreeHostImpl; | 55 class LayerTreeHostImpl; |
55 class LayerTreeHostImplClient; | 56 class LayerTreeHostImplClient; |
56 class LayerTreeHostSingleThreadClient; | 57 class LayerTreeHostSingleThreadClient; |
57 class PrioritizedResource; | 58 class PrioritizedResource; |
58 class PrioritizedResourceManager; | 59 class PrioritizedResourceManager; |
59 class Region; | 60 class Region; |
60 class RenderingStatsInstrumentation; | 61 class RenderingStatsInstrumentation; |
61 class ResourceProvider; | 62 class ResourceProvider; |
62 class ResourceUpdateQueue; | 63 class ResourceUpdateQueue; |
63 class SharedBitmapManager; | 64 class SharedBitmapManager; |
64 class TopControlsManager; | 65 class TopControlsManager; |
65 class UIResourceRequest; | 66 class UIResourceRequest; |
66 struct PendingPageScaleAnimation; | 67 struct PendingPageScaleAnimation; |
67 struct RenderingStats; | 68 struct RenderingStats; |
68 struct ScrollAndScaleSet; | 69 struct ScrollAndScaleSet; |
69 enum class GpuRasterizationStatus; | 70 enum class GpuRasterizationStatus; |
70 | 71 |
71 class CC_EXPORT LayerTreeHost { | 72 class CC_EXPORT LayerTreeHost { |
72 public: | 73 public: |
73 // The SharedBitmapManager will be used on the compositor thread. | 74 // The SharedBitmapManager will be used on the compositor thread. |
74 static scoped_ptr<LayerTreeHost> CreateThreaded( | 75 static scoped_ptr<LayerTreeHost> CreateThreaded( |
75 LayerTreeHostClient* client, | 76 LayerTreeHostClient* client, |
76 SharedBitmapManager* shared_bitmap_manager, | 77 SharedBitmapManager* shared_bitmap_manager, |
77 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 78 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
79 CompositorMutator* compositor_mutator, | |
78 const LayerTreeSettings& settings, | 80 const LayerTreeSettings& settings, |
79 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 81 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
80 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 82 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
81 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 83 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
82 | 84 |
83 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( | 85 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( |
84 LayerTreeHostClient* client, | 86 LayerTreeHostClient* client, |
85 LayerTreeHostSingleThreadClient* single_thread_client, | 87 LayerTreeHostSingleThreadClient* single_thread_client, |
86 SharedBitmapManager* shared_bitmap_manager, | 88 SharedBitmapManager* shared_bitmap_manager, |
87 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 89 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
90 CompositorMutator* compositor_mutator, | |
88 const LayerTreeSettings& settings, | 91 const LayerTreeSettings& settings, |
89 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 92 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
90 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 93 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
91 virtual ~LayerTreeHost(); | 94 virtual ~LayerTreeHost(); |
92 | 95 |
93 void SetLayerTreeHostClientReady(); | 96 void SetLayerTreeHostClientReady(); |
94 | 97 |
95 // LayerTreeHost interface to Proxy. | 98 // LayerTreeHost interface to Proxy. |
96 void WillBeginMainFrame(); | 99 void WillBeginMainFrame(); |
97 void DidBeginMainFrame(); | 100 void DidBeginMainFrame(); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
300 void set_surface_id_namespace(uint32_t id_namespace); | 303 void set_surface_id_namespace(uint32_t id_namespace); |
301 SurfaceSequence CreateSurfaceSequence(); | 304 SurfaceSequence CreateSurfaceSequence(); |
302 | 305 |
303 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const; | 306 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const; |
304 void SendBeginFramesToChildren(const BeginFrameArgs& args) const; | 307 void SendBeginFramesToChildren(const BeginFrameArgs& args) const; |
305 | 308 |
306 protected: | 309 protected: |
307 LayerTreeHost(LayerTreeHostClient* client, | 310 LayerTreeHost(LayerTreeHostClient* client, |
308 SharedBitmapManager* shared_bitmap_manager, | 311 SharedBitmapManager* shared_bitmap_manager, |
309 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 312 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
313 CompositorMutator* compositor_mutator, | |
310 const LayerTreeSettings& settings); | 314 const LayerTreeSettings& settings); |
311 void InitializeThreaded( | 315 void InitializeThreaded( |
312 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 316 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
313 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 317 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
314 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 318 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
315 void InitializeSingleThreaded( | 319 void InitializeSingleThreaded( |
316 LayerTreeHostSingleThreadClient* single_thread_client, | 320 LayerTreeHostSingleThreadClient* single_thread_client, |
317 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 321 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
318 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 322 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
319 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 323 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
434 scoped_refptr<Layer> page_scale_layer_; | 438 scoped_refptr<Layer> page_scale_layer_; |
435 scoped_refptr<Layer> inner_viewport_scroll_layer_; | 439 scoped_refptr<Layer> inner_viewport_scroll_layer_; |
436 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 440 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
437 | 441 |
438 LayerSelectionBound selection_start_; | 442 LayerSelectionBound selection_start_; |
439 LayerSelectionBound selection_end_; | 443 LayerSelectionBound selection_end_; |
440 | 444 |
441 SharedBitmapManager* shared_bitmap_manager_; | 445 SharedBitmapManager* shared_bitmap_manager_; |
442 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 446 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
443 | 447 |
448 CompositorMutator* compositor_mutator_; | |
loyso (OOO)
2015/04/13 08:03:21
JUST NOTE: This is exactly what I have here: https
| |
449 | |
444 ScopedPtrVector<SwapPromise> swap_promise_list_; | 450 ScopedPtrVector<SwapPromise> swap_promise_list_; |
445 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 451 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
446 | 452 |
447 uint32_t surface_id_namespace_; | 453 uint32_t surface_id_namespace_; |
448 uint32_t next_surface_sequence_; | 454 uint32_t next_surface_sequence_; |
449 | 455 |
450 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 456 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
451 }; | 457 }; |
452 | 458 |
453 } // namespace cc | 459 } // namespace cc |
454 | 460 |
455 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 461 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |