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_LAYER_TREE_HOST_H_ | 5 #ifndef CC_LAYER_TREE_HOST_H_ |
6 #define CC_LAYER_TREE_HOST_H_ | 6 #define CC_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class AnimationRegistrar; | 46 class AnimationRegistrar; |
47 class HeadsUpDisplayLayer; | 47 class HeadsUpDisplayLayer; |
48 class Layer; | 48 class Layer; |
49 class LayerTreeHostImpl; | 49 class LayerTreeHostImpl; |
50 class LayerTreeHostImplClient; | 50 class LayerTreeHostImplClient; |
51 class PrioritizedResourceManager; | 51 class PrioritizedResourceManager; |
52 class PrioritizedResource; | 52 class PrioritizedResource; |
53 class Region; | 53 class Region; |
54 class ResourceProvider; | 54 class ResourceProvider; |
55 class ResourceUpdateQueue; | 55 class ResourceUpdateQueue; |
| 56 class ScrollbarLayer; |
56 class TopControlsManager; | 57 class TopControlsManager; |
57 struct ScrollAndScaleSet; | 58 struct ScrollAndScaleSet; |
58 | 59 |
59 // Provides information on an Impl's rendering capabilities back to the | 60 // Provides information on an Impl's rendering capabilities back to the |
60 // LayerTreeHost. | 61 // LayerTreeHost. |
61 struct CC_EXPORT RendererCapabilities { | 62 struct CC_EXPORT RendererCapabilities { |
62 RendererCapabilities(); | 63 RendererCapabilities(); |
63 ~RendererCapabilities(); | 64 ~RendererCapabilities(); |
64 | 65 |
65 unsigned best_texture_format; | 66 unsigned best_texture_format; |
(...skipping 27 matching lines...) Expand all Loading... |
93 } | 94 } |
94 | 95 |
95 // LayerTreeHost interface to Proxy. | 96 // LayerTreeHost interface to Proxy. |
96 void WillBeginFrame() { client_->willBeginFrame(); } | 97 void WillBeginFrame() { client_->willBeginFrame(); } |
97 void DidBeginFrame(); | 98 void DidBeginFrame(); |
98 void UpdateAnimations(base::TimeTicks monotonic_frame_begin_time); | 99 void UpdateAnimations(base::TimeTicks monotonic_frame_begin_time); |
99 void DidStopFlinging(); | 100 void DidStopFlinging(); |
100 void Layout(); | 101 void Layout(); |
101 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); | 102 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); |
102 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); | 103 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| 104 void SetPinchZoomScrollbarsBoundsAndPosition(); |
| 105 void CreateAndAddPinchZoomScrollbars(); |
103 void WillCommit(); | 106 void WillCommit(); |
104 void CommitComplete(); | 107 void CommitComplete(); |
105 scoped_ptr<OutputSurface> CreateOutputSurface(); | 108 scoped_ptr<OutputSurface> CreateOutputSurface(); |
106 scoped_ptr<InputHandler> CreateInputHandler(); | 109 scoped_ptr<InputHandler> CreateInputHandler(); |
107 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 110 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
108 LayerTreeHostImplClient* client); | 111 LayerTreeHostImplClient* client); |
109 void DidLoseOutputSurface(); | 112 void DidLoseOutputSurface(); |
110 enum RecreateResult { | 113 enum RecreateResult { |
111 RecreateSucceeded, | 114 RecreateSucceeded, |
112 RecreateFailedButTryAgain, | 115 RecreateFailedButTryAgain, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual void SetNeedsFullTreeSync(); | 155 virtual void SetNeedsFullTreeSync(); |
153 void SetNeedsRedraw(); | 156 void SetNeedsRedraw(); |
154 bool CommitRequested() const; | 157 bool CommitRequested() const; |
155 | 158 |
156 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, | 159 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, |
157 base::Time wall_clock_time); | 160 base::Time wall_clock_time); |
158 | 161 |
159 void SetRootLayer(scoped_refptr<Layer> root_layer); | 162 void SetRootLayer(scoped_refptr<Layer> root_layer); |
160 Layer* root_layer() { return root_layer_.get(); } | 163 Layer* root_layer() { return root_layer_.get(); } |
161 const Layer* root_layer() const { return root_layer_.get(); } | 164 const Layer* root_layer() const { return root_layer_.get(); } |
| 165 const Layer* RootScrollLayer() const; |
162 | 166 |
163 const LayerTreeSettings& settings() const { return settings_; } | 167 const LayerTreeSettings& settings() const { return settings_; } |
164 | 168 |
165 void SetDebugState(const LayerTreeDebugState& debug_state); | 169 void SetDebugState(const LayerTreeDebugState& debug_state); |
166 const LayerTreeDebugState& debug_state() const { return debug_state_; } | 170 const LayerTreeDebugState& debug_state() const { return debug_state_; } |
167 | 171 |
168 void SetViewportSize(gfx::Size layout_viewport_size, | 172 void SetViewportSize(gfx::Size layout_viewport_size, |
169 gfx::Size device_viewport_size); | 173 gfx::Size device_viewport_size); |
170 | 174 |
171 gfx::Size layout_viewport_size() const { return layout_viewport_size_; } | 175 gfx::Size layout_viewport_size() const { return layout_viewport_size_; } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 276 |
273 int commit_number_; | 277 int commit_number_; |
274 RenderingStats rendering_stats_; | 278 RenderingStats rendering_stats_; |
275 | 279 |
276 bool renderer_initialized_; | 280 bool renderer_initialized_; |
277 bool output_surface_lost_; | 281 bool output_surface_lost_; |
278 int num_failed_recreate_attempts_; | 282 int num_failed_recreate_attempts_; |
279 | 283 |
280 scoped_refptr<Layer> root_layer_; | 284 scoped_refptr<Layer> root_layer_; |
281 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; | 285 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; |
| 286 scoped_refptr<ScrollbarLayer> pinch_zoom_scrollbar_horizontal_; |
| 287 scoped_refptr<ScrollbarLayer> pinch_zoom_scrollbar_vertical_; |
282 | 288 |
283 scoped_ptr<PrioritizedResourceManager> contents_texture_manager_; | 289 scoped_ptr<PrioritizedResourceManager> contents_texture_manager_; |
284 scoped_ptr<PrioritizedResource> surface_memory_placeholder_; | 290 scoped_ptr<PrioritizedResource> surface_memory_placeholder_; |
285 | 291 |
286 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; | 292 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; |
287 | 293 |
288 LayerTreeSettings settings_; | 294 LayerTreeSettings settings_; |
289 LayerTreeDebugState debug_state_; | 295 LayerTreeDebugState debug_state_; |
290 | 296 |
291 gfx::Size layout_viewport_size_; | 297 gfx::Size layout_viewport_size_; |
(...skipping 18 matching lines...) Expand all Loading... |
310 size_t partial_texture_update_requests_; | 316 size_t partial_texture_update_requests_; |
311 | 317 |
312 scoped_ptr<AnimationRegistrar> animation_registrar_; | 318 scoped_ptr<AnimationRegistrar> animation_registrar_; |
313 | 319 |
314 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 320 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
315 }; | 321 }; |
316 | 322 |
317 } // namespace cc | 323 } // namespace cc |
318 | 324 |
319 #endif // CC_LAYER_TREE_HOST_H_ | 325 #endif // CC_LAYER_TREE_HOST_H_ |
OLD | NEW |