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 <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "cc/trees/layer_tree_host_client.h" | 37 #include "cc/trees/layer_tree_host_client.h" |
38 #include "cc/trees/layer_tree_host_common.h" | 38 #include "cc/trees/layer_tree_host_common.h" |
39 #include "cc/trees/layer_tree_settings.h" | 39 #include "cc/trees/layer_tree_settings.h" |
40 #include "cc/trees/proxy.h" | 40 #include "cc/trees/proxy.h" |
41 #include "third_party/skia/include/core/SkColor.h" | 41 #include "third_party/skia/include/core/SkColor.h" |
42 #include "ui/gfx/rect.h" | 42 #include "ui/gfx/rect.h" |
43 | 43 |
44 namespace cc { | 44 namespace cc { |
45 | 45 |
46 class AnimationRegistrar; | 46 class AnimationRegistrar; |
| 47 class BeginFrameManager; |
47 class HeadsUpDisplayLayer; | 48 class HeadsUpDisplayLayer; |
48 class Layer; | 49 class Layer; |
49 class LayerTreeHostImpl; | 50 class LayerTreeHostImpl; |
50 class LayerTreeHostImplClient; | 51 class LayerTreeHostImplClient; |
51 class LayerTreeHostSingleThreadClient; | 52 class LayerTreeHostSingleThreadClient; |
52 class PrioritizedResource; | 53 class PrioritizedResource; |
53 class PrioritizedResourceManager; | 54 class PrioritizedResourceManager; |
54 class Region; | 55 class Region; |
55 class RenderingStatsInstrumentation; | 56 class RenderingStatsInstrumentation; |
56 class ResourceProvider; | 57 class ResourceProvider; |
(...skipping 30 matching lines...) Expand all Loading... |
87 SharedBitmapManager* manager, | 88 SharedBitmapManager* manager, |
88 const LayerTreeSettings& settings, | 89 const LayerTreeSettings& settings, |
89 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 90 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
90 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 91 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
91 | 92 |
92 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( | 93 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( |
93 LayerTreeHostClient* client, | 94 LayerTreeHostClient* client, |
94 LayerTreeHostSingleThreadClient* single_thread_client, | 95 LayerTreeHostSingleThreadClient* single_thread_client, |
95 SharedBitmapManager* manager, | 96 SharedBitmapManager* manager, |
96 const LayerTreeSettings& settings, | 97 const LayerTreeSettings& settings, |
97 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 98 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 99 BeginFrameManager* begin_frame_manager); |
98 virtual ~LayerTreeHost(); | 100 virtual ~LayerTreeHost(); |
99 | 101 |
100 void SetLayerTreeHostClientReady(); | 102 void SetLayerTreeHostClientReady(); |
101 | 103 |
102 // LayerTreeHost interface to Proxy. | 104 // LayerTreeHost interface to Proxy. |
103 void WillBeginMainFrame() { | 105 void WillBeginMainFrame() { |
104 client_->WillBeginMainFrame(source_frame_number_); | 106 client_->WillBeginMainFrame(source_frame_number_); |
105 } | 107 } |
106 void DidBeginMainFrame(); | 108 void DidBeginMainFrame(); |
107 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); | 109 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 303 |
302 protected: | 304 protected: |
303 LayerTreeHost(LayerTreeHostClient* client, | 305 LayerTreeHost(LayerTreeHostClient* client, |
304 SharedBitmapManager* manager, | 306 SharedBitmapManager* manager, |
305 const LayerTreeSettings& settings); | 307 const LayerTreeSettings& settings); |
306 void InitializeThreaded( | 308 void InitializeThreaded( |
307 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 309 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
308 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 310 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
309 void InitializeSingleThreaded( | 311 void InitializeSingleThreaded( |
310 LayerTreeHostSingleThreadClient* single_thread_client, | 312 LayerTreeHostSingleThreadClient* single_thread_client, |
311 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 313 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 314 BeginFrameManager* begin_frame_manager); |
312 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 315 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
313 void SetOutputSurfaceLostForTesting(bool is_lost) { | 316 void SetOutputSurfaceLostForTesting(bool is_lost) { |
314 output_surface_lost_ = is_lost; | 317 output_surface_lost_ = is_lost; |
315 } | 318 } |
316 | 319 |
317 MicroBenchmarkController micro_benchmark_controller_; | 320 MicroBenchmarkController micro_benchmark_controller_; |
318 | 321 |
319 private: | 322 private: |
320 void InitializeProxy(scoped_ptr<Proxy> proxy); | 323 void InitializeProxy(scoped_ptr<Proxy> proxy); |
321 | 324 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 457 |
455 ScopedPtrVector<SwapPromise> swap_promise_list_; | 458 ScopedPtrVector<SwapPromise> swap_promise_list_; |
456 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 459 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
457 | 460 |
458 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 461 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
459 }; | 462 }; |
460 | 463 |
461 } // namespace cc | 464 } // namespace cc |
462 | 465 |
463 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 466 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |