OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_IMPL_H_ |
6 #define CC_LAYER_TREE_IMPL_H_ | 6 #define CC_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class HeadsUpDisplayLayerImpl; | 27 class HeadsUpDisplayLayerImpl; |
28 class LayerTreeDebugState; | 28 class LayerTreeDebugState; |
29 class LayerTreeHostImpl; | 29 class LayerTreeHostImpl; |
30 class LayerTreeImpl; | 30 class LayerTreeImpl; |
31 class LayerTreeSettings; | 31 class LayerTreeSettings; |
32 class MemoryHistory; | 32 class MemoryHistory; |
33 class OutputSurface; | 33 class OutputSurface; |
34 class PaintTimeCounter; | 34 class PaintTimeCounter; |
35 class Proxy; | 35 class Proxy; |
36 class ResourceProvider; | 36 class ResourceProvider; |
| 37 class ScrollbarLayerImpl; |
37 class TileManager; | 38 class TileManager; |
38 struct RendererCapabilities; | 39 struct RendererCapabilities; |
39 | 40 |
40 class CC_EXPORT LayerTreeImpl { | 41 class CC_EXPORT LayerTreeImpl { |
41 public: | 42 public: |
42 typedef std::vector<LayerImpl*> LayerList; | 43 typedef std::vector<LayerImpl*> LayerList; |
43 | 44 |
44 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp
l) | 45 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp
l) |
45 { | 46 { |
46 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); | 47 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 185 |
185 // Set on the active tree when the viewport size recently changed | 186 // Set on the active tree when the viewport size recently changed |
186 // and the active tree's size is now out of date. | 187 // and the active tree's size is now out of date. |
187 bool ViewportSizeInvalid() const; | 188 bool ViewportSizeInvalid() const; |
188 void SetViewportSizeInvalid(); | 189 void SetViewportSizeInvalid(); |
189 void ResetViewportSizeInvalid(); | 190 void ResetViewportSizeInvalid(); |
190 | 191 |
191 // Useful for debug assertions, probably shouldn't be used for anything else. | 192 // Useful for debug assertions, probably shouldn't be used for anything else. |
192 Proxy* proxy() const; | 193 Proxy* proxy() const; |
193 | 194 |
| 195 void SetPinchZoomHorizontalLayerId(int layer_id); |
| 196 void SetPinchZoomVerticalLayerId(int layer_id); |
| 197 |
| 198 void DidBeginScroll(); |
| 199 void DidUpdateScroll(); |
| 200 void DidEndScroll(); |
| 201 |
194 protected: | 202 protected: |
195 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 203 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
196 | 204 |
197 void UpdateSolidColorScrollbars(); | 205 void UpdateSolidColorScrollbars(); |
198 | 206 |
| 207 // Hide existence of pinch-zoom scrollbars. |
| 208 void UpdatePinchZoomScrollbars(); |
| 209 void FadeInPinchZoomScrollbars(); |
| 210 void FadeOutPinchZoomScrollbars(); |
| 211 ScrollbarLayerImpl* PinchZoomScrollbarHorizontal(); |
| 212 ScrollbarLayerImpl* PinchZoomScrollbarVertical(); |
| 213 bool HasPinchZoomScrollbars() const; |
| 214 |
199 LayerTreeHostImpl* layer_tree_host_impl_; | 215 LayerTreeHostImpl* layer_tree_host_impl_; |
200 int source_frame_number_; | 216 int source_frame_number_; |
201 scoped_ptr<LayerImpl> root_layer_; | 217 scoped_ptr<LayerImpl> root_layer_; |
202 HeadsUpDisplayLayerImpl* hud_layer_; | 218 HeadsUpDisplayLayerImpl* hud_layer_; |
203 LayerImpl* root_scroll_layer_; | 219 LayerImpl* root_scroll_layer_; |
204 LayerImpl* currently_scrolling_layer_; | 220 LayerImpl* currently_scrolling_layer_; |
205 SkColor background_color_; | 221 SkColor background_color_; |
206 bool has_transparent_background_; | 222 bool has_transparent_background_; |
207 | 223 |
| 224 int pinch_zoom_scrollbar_horizontal_layer_id_; |
| 225 int pinch_zoom_scrollbar_vertical_layer_id_; |
| 226 |
208 float page_scale_factor_; | 227 float page_scale_factor_; |
209 float page_scale_delta_; | 228 float page_scale_delta_; |
210 float sent_page_scale_delta_; | 229 float sent_page_scale_delta_; |
211 float min_page_scale_factor_; | 230 float min_page_scale_factor_; |
212 float max_page_scale_factor_; | 231 float max_page_scale_factor_; |
213 | 232 |
214 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 233 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
215 LayerIdMap layer_id_map_; | 234 LayerIdMap layer_id_map_; |
216 | 235 |
217 // Persisted state for non-impl-side-painting. | 236 // Persisted state for non-impl-side-painting. |
(...skipping 10 matching lines...) Expand all Loading... |
228 // In impl-side painting mode, this is true when the tree may contain | 247 // In impl-side painting mode, this is true when the tree may contain |
229 // structural differences relative to the active tree. | 248 // structural differences relative to the active tree. |
230 bool needs_full_tree_sync_; | 249 bool needs_full_tree_sync_; |
231 | 250 |
232 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 251 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
233 }; | 252 }; |
234 | 253 |
235 } | 254 } |
236 | 255 |
237 #endif // CC_LAYER_TREE_IMPL_H_ | 256 #endif // CC_LAYER_TREE_IMPL_H_ |
OLD | NEW |