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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 184 |
184 // Set on the active tree when the viewport size recently changed | 185 // Set on the active tree when the viewport size recently changed |
185 // and the active tree's size is now out of date. | 186 // and the active tree's size is now out of date. |
186 bool ViewportSizeInvalid() const; | 187 bool ViewportSizeInvalid() const; |
187 void SetViewportSizeInvalid(); | 188 void SetViewportSizeInvalid(); |
188 void ResetViewportSizeInvalid(); | 189 void ResetViewportSizeInvalid(); |
189 | 190 |
190 // Useful for debug assertions, probably shouldn't be used for anything else. | 191 // Useful for debug assertions, probably shouldn't be used for anything else. |
191 Proxy* proxy() const; | 192 Proxy* proxy() const; |
192 | 193 |
194 void SetPinchZoomHorizontalLayerId(int layer_id); | |
195 ScrollbarLayerImpl* PinchZoomScrollbarHorizontal(); | |
enne (OOO)
2013/03/11 21:08:24
This should not be public.
wjmaclean
2013/03/12 16:13:07
Done.
| |
196 void SetPinchZoomVerticalLayerId(int layer_id); | |
197 ScrollbarLayerImpl* PinchZoomScrollbarVertical(); | |
enne (OOO)
2013/03/11 21:08:24
Neither should this.
wjmaclean
2013/03/12 16:13:07
Done.
| |
198 | |
199 void DidBeginScroll(); | |
200 void DidUpdateScroll(); | |
201 void DidEndScroll(); | |
202 | |
193 protected: | 203 protected: |
194 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 204 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
195 | 205 |
206 // Hide existence of pinch-zoom scrollbars. | |
207 void UpdatePinchZoomScrollbars(); | |
208 void FadeInPinchZoomScrollbars(); | |
209 void FadeOutPinchZoomScrollbars(); | |
210 bool HasPinchZoomScrollbars() const; | |
211 | |
196 LayerTreeHostImpl* layer_tree_host_impl_; | 212 LayerTreeHostImpl* layer_tree_host_impl_; |
197 int source_frame_number_; | 213 int source_frame_number_; |
198 scoped_ptr<LayerImpl> root_layer_; | 214 scoped_ptr<LayerImpl> root_layer_; |
199 HeadsUpDisplayLayerImpl* hud_layer_; | 215 HeadsUpDisplayLayerImpl* hud_layer_; |
200 LayerImpl* root_scroll_layer_; | 216 LayerImpl* root_scroll_layer_; |
201 LayerImpl* currently_scrolling_layer_; | 217 LayerImpl* currently_scrolling_layer_; |
202 SkColor background_color_; | 218 SkColor background_color_; |
203 bool has_transparent_background_; | 219 bool has_transparent_background_; |
204 | 220 |
221 int pinch_zoom_scrollbar_horizontal_layer_id_; | |
222 int pinch_zoom_scrollbar_vertical_layer_id_; | |
223 | |
205 float page_scale_factor_; | 224 float page_scale_factor_; |
206 float page_scale_delta_; | 225 float page_scale_delta_; |
207 float sent_page_scale_delta_; | 226 float sent_page_scale_delta_; |
208 float min_page_scale_factor_; | 227 float min_page_scale_factor_; |
209 float max_page_scale_factor_; | 228 float max_page_scale_factor_; |
210 | 229 |
211 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 230 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
212 LayerIdMap layer_id_map_; | 231 LayerIdMap layer_id_map_; |
213 | 232 |
214 // Persisted state for non-impl-side-painting. | 233 // Persisted state for non-impl-side-painting. |
(...skipping 10 matching lines...) Expand all Loading... | |
225 // In impl-side painting mode, this is true when the tree may contain | 244 // In impl-side painting mode, this is true when the tree may contain |
226 // structural differences relative to the active tree. | 245 // structural differences relative to the active tree. |
227 bool needs_full_tree_sync_; | 246 bool needs_full_tree_sync_; |
228 | 247 |
229 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 248 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
230 }; | 249 }; |
231 | 250 |
232 } | 251 } |
233 | 252 |
234 #endif // CC_LAYER_TREE_IMPL_H_ | 253 #endif // CC_LAYER_TREE_IMPL_H_ |
OLD | NEW |