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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 namespace cc { | 48 namespace cc { |
49 class AnimationRegistrar; | 49 class AnimationRegistrar; |
50 class BeginFrameSource; | 50 class BeginFrameSource; |
51 class HeadsUpDisplayLayer; | 51 class HeadsUpDisplayLayer; |
52 class Layer; | 52 class Layer; |
53 class LayerTreeHostImpl; | 53 class LayerTreeHostImpl; |
54 class LayerTreeHostImplClient; | 54 class LayerTreeHostImplClient; |
55 class LayerTreeHostSingleThreadClient; | 55 class LayerTreeHostSingleThreadClient; |
56 class PrioritizedResource; | 56 class PrioritizedResource; |
57 class PrioritizedResourceManager; | 57 class PrioritizedResourceManager; |
| 58 class ProxyBeginFrameSource; |
58 class Region; | 59 class Region; |
59 class RenderingStatsInstrumentation; | 60 class RenderingStatsInstrumentation; |
60 class ResourceProvider; | 61 class ResourceProvider; |
61 class ResourceUpdateQueue; | 62 class ResourceUpdateQueue; |
62 class SharedBitmapManager; | 63 class SharedBitmapManager; |
63 class TopControlsManager; | 64 class TopControlsManager; |
64 class UIResourceRequest; | 65 class UIResourceRequest; |
65 struct PendingPageScaleAnimation; | 66 struct PendingPageScaleAnimation; |
66 struct RenderingStats; | 67 struct RenderingStats; |
67 struct ScrollAndScaleSet; | 68 struct ScrollAndScaleSet; |
(...skipping 29 matching lines...) Expand all Loading... |
97 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 98 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
98 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 99 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
99 | 100 |
100 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( | 101 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( |
101 LayerTreeHostClient* client, | 102 LayerTreeHostClient* client, |
102 LayerTreeHostSingleThreadClient* single_thread_client, | 103 LayerTreeHostSingleThreadClient* single_thread_client, |
103 SharedBitmapManager* shared_bitmap_manager, | 104 SharedBitmapManager* shared_bitmap_manager, |
104 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 105 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
105 const LayerTreeSettings& settings, | 106 const LayerTreeSettings& settings, |
106 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 107 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
107 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 108 scoped_ptr<BeginFrameSource> external_begin_frame_source, |
| 109 ProxyBeginFrameSource* proxy_begin_frame_source); |
108 virtual ~LayerTreeHost(); | 110 virtual ~LayerTreeHost(); |
109 | 111 |
110 void SetLayerTreeHostClientReady(); | 112 void SetLayerTreeHostClientReady(); |
111 | 113 |
112 // LayerTreeHost interface to Proxy. | 114 // LayerTreeHost interface to Proxy. |
113 void WillBeginMainFrame() { | 115 void WillBeginMainFrame() { |
114 client_->WillBeginMainFrame(source_frame_number_); | 116 client_->WillBeginMainFrame(source_frame_number_); |
115 } | 117 } |
116 void DidBeginMainFrame(); | 118 void DidBeginMainFrame(); |
117 void BeginMainFrame(const BeginFrameArgs& args); | 119 void BeginMainFrame(const BeginFrameArgs& args); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // See swap_promise.h for how to use SwapPromise. | 320 // See swap_promise.h for how to use SwapPromise. |
319 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 321 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
320 | 322 |
321 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 323 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
322 | 324 |
323 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } | 325 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } |
324 | 326 |
325 void set_surface_id_namespace(uint32_t id_namespace); | 327 void set_surface_id_namespace(uint32_t id_namespace); |
326 SurfaceSequence CreateSurfaceSequence(); | 328 SurfaceSequence CreateSurfaceSequence(); |
327 | 329 |
328 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const; | |
329 void SendBeginFramesToChildren(const BeginFrameArgs& args) const; | |
330 | |
331 protected: | 330 protected: |
332 LayerTreeHost(LayerTreeHostClient* client, | 331 LayerTreeHost(LayerTreeHostClient* client, |
333 SharedBitmapManager* shared_bitmap_manager, | 332 SharedBitmapManager* shared_bitmap_manager, |
334 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 333 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
335 const LayerTreeSettings& settings); | 334 const LayerTreeSettings& settings); |
336 void InitializeThreaded( | 335 void InitializeThreaded( |
337 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 336 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
338 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 337 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
339 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 338 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
340 void InitializeSingleThreaded( | 339 void InitializeSingleThreaded( |
341 LayerTreeHostSingleThreadClient* single_thread_client, | 340 LayerTreeHostSingleThreadClient* single_thread_client, |
342 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 341 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
343 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 342 scoped_ptr<BeginFrameSource> external_begin_frame_source, |
| 343 ProxyBeginFrameSource* proxy_begin_frame_source); |
344 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 344 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
345 void SetOutputSurfaceLostForTesting(bool is_lost) { | 345 void SetOutputSurfaceLostForTesting(bool is_lost) { |
346 output_surface_lost_ = is_lost; | 346 output_surface_lost_ = is_lost; |
347 } | 347 } |
348 | 348 |
349 MicroBenchmarkController micro_benchmark_controller_; | 349 MicroBenchmarkController micro_benchmark_controller_; |
350 | 350 |
351 private: | 351 private: |
352 void InitializeProxy(scoped_ptr<Proxy> proxy); | 352 void InitializeProxy(scoped_ptr<Proxy> proxy); |
353 | 353 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 uint32_t surface_id_namespace_; | 486 uint32_t surface_id_namespace_; |
487 uint32_t next_surface_sequence_; | 487 uint32_t next_surface_sequence_; |
488 | 488 |
489 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 489 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
490 }; | 490 }; |
491 | 491 |
492 } // namespace cc | 492 } // namespace cc |
493 | 493 |
494 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 494 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |