| 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(); |
| 196 void SetPinchZoomVerticalLayerId(int layer_id); |
| 197 ScrollbarLayerImpl* PinchZoomScrollbarVertical(); |
| 198 |
| 199 void UpdatePinchZoomScrollbarsIfNeeded(bool force_update = false); |
| 200 void FadeInPinchZoomScrollbars(); |
| 201 void FadeOutPinchZoomScrollbars(); |
| 202 |
| 203 bool HasPinchZoomScrollbars() { |
| 204 return pinch_zoom_scrollbar_horizontal_layer_id && |
| 205 pinch_zoom_scrollbar_vertical_layer_id; |
| 206 } |
| 207 |
| 193 protected: | 208 protected: |
| 194 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 209 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 195 | 210 |
| 196 LayerTreeHostImpl* layer_tree_host_impl_; | 211 LayerTreeHostImpl* layer_tree_host_impl_; |
| 197 int source_frame_number_; | 212 int source_frame_number_; |
| 198 scoped_ptr<LayerImpl> root_layer_; | 213 scoped_ptr<LayerImpl> root_layer_; |
| 199 HeadsUpDisplayLayerImpl* hud_layer_; | 214 HeadsUpDisplayLayerImpl* hud_layer_; |
| 200 LayerImpl* root_scroll_layer_; | 215 LayerImpl* root_scroll_layer_; |
| 201 LayerImpl* currently_scrolling_layer_; | 216 LayerImpl* currently_scrolling_layer_; |
| 202 SkColor background_color_; | 217 SkColor background_color_; |
| 203 bool has_transparent_background_; | 218 bool has_transparent_background_; |
| 204 | 219 |
| 220 int pinch_zoom_scrollbar_horizontal_layer_id; |
| 221 int pinch_zoom_scrollbar_vertical_layer_id; |
| 222 |
| 205 float page_scale_factor_; | 223 float page_scale_factor_; |
| 206 float page_scale_delta_; | 224 float page_scale_delta_; |
| 207 float sent_page_scale_delta_; | 225 float sent_page_scale_delta_; |
| 208 float min_page_scale_factor_; | 226 float min_page_scale_factor_; |
| 209 float max_page_scale_factor_; | 227 float max_page_scale_factor_; |
| 210 | 228 |
| 211 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 229 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
| 212 LayerIdMap layer_id_map_; | 230 LayerIdMap layer_id_map_; |
| 213 | 231 |
| 214 // Persisted state for non-impl-side-painting. | 232 // 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 | 243 // In impl-side painting mode, this is true when the tree may contain |
| 226 // structural differences relative to the active tree. | 244 // structural differences relative to the active tree. |
| 227 bool needs_full_tree_sync_; | 245 bool needs_full_tree_sync_; |
| 228 | 246 |
| 229 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 247 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 230 }; | 248 }; |
| 231 | 249 |
| 232 } | 250 } |
| 233 | 251 |
| 234 #endif // CC_LAYER_TREE_IMPL_H_ | 252 #endif // CC_LAYER_TREE_IMPL_H_ |
| OLD | NEW |