Chromium Code Reviews| 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_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 namespace trace_event { | 27 namespace trace_event { |
| 28 class TracedValue; | 28 class TracedValue; |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace cc { | 32 namespace cc { |
| 33 | 33 |
| 34 class ContextProvider; | 34 class ContextProvider; |
| 35 class DebugRectHistory; | 35 class DebugRectHistory; |
| 36 class FrameRateCounter; | 36 class FrameRateCounter; |
| 37 class ElementLayers; | |
| 37 class HeadsUpDisplayLayerImpl; | 38 class HeadsUpDisplayLayerImpl; |
| 38 class LayerExternalScrollOffsetListener; | 39 class LayerExternalScrollOffsetListener; |
| 39 class LayerScrollOffsetDelegate; | 40 class LayerScrollOffsetDelegate; |
| 40 class LayerTreeDebugState; | 41 class LayerTreeDebugState; |
| 41 class LayerTreeImpl; | 42 class LayerTreeImpl; |
| 42 class LayerTreeSettings; | 43 class LayerTreeSettings; |
| 43 class MemoryHistory; | 44 class MemoryHistory; |
| 44 class OutputSurface; | 45 class OutputSurface; |
| 45 class PageScaleAnimation; | 46 class PageScaleAnimation; |
| 46 class PictureLayerImpl; | 47 class PictureLayerImpl; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 void SetPropertyTrees(const PropertyTrees& property_trees) { | 130 void SetPropertyTrees(const PropertyTrees& property_trees) { |
| 130 property_trees_ = property_trees; | 131 property_trees_ = property_trees; |
| 131 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); | 132 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); |
| 132 } | 133 } |
| 133 PropertyTrees* property_trees() { return &property_trees_; } | 134 PropertyTrees* property_trees() { return &property_trees_; } |
| 134 | 135 |
| 135 void UpdatePropertyTreesForBoundsDelta(); | 136 void UpdatePropertyTreesForBoundsDelta(); |
| 136 | 137 |
| 137 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 138 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
| 138 | 139 |
| 140 void AddToElementMap(LayerImpl* layer); | |
| 141 void RemoveFromElementMap(LayerImpl* layer); | |
| 142 bool GetMutableLayers(uint64_t element_id, | |
| 143 LayerImpl** main_layer, | |
| 144 LayerImpl** scroll_layer); | |
| 139 int source_frame_number() const { return source_frame_number_; } | 145 int source_frame_number() const { return source_frame_number_; } |
| 140 void set_source_frame_number(int frame_number) { | 146 void set_source_frame_number(int frame_number) { |
| 141 source_frame_number_ = frame_number; | 147 source_frame_number_ = frame_number; |
| 142 } | 148 } |
| 143 | 149 |
| 144 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 150 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
| 145 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { | 151 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { |
| 146 hud_layer_ = layer_impl; | 152 hud_layer_ = layer_impl; |
| 147 } | 153 } |
| 148 | 154 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 float max_page_scale_factor_; | 450 float max_page_scale_factor_; |
| 445 | 451 |
| 446 float device_scale_factor_; | 452 float device_scale_factor_; |
| 447 float painted_device_scale_factor_; | 453 float painted_device_scale_factor_; |
| 448 | 454 |
| 449 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 455 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
| 450 | 456 |
| 451 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 457 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
| 452 LayerIdMap layer_id_map_; | 458 LayerIdMap layer_id_map_; |
| 453 | 459 |
| 460 std::map<uint64_t, ElementLayers> element_layers_map_; | |
|
esprehn
2015/11/16 20:01:04
does the order matter here? Why map instead of has
Ian Vollick
2015/11/18 17:20:33
Done.
| |
| 461 | |
| 454 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 462 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
| 455 // the subset of clip layers that act as scrolling containers. (This is | 463 // the subset of clip layers that act as scrolling containers. (This is |
| 456 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) | 464 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) |
| 457 base::hash_map<int, int> clip_scroll_map_; | 465 base::hash_map<int, int> clip_scroll_map_; |
| 458 | 466 |
| 459 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there | 467 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there |
| 460 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is | 468 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is |
| 461 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid | 469 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid |
| 462 // O(n) walks.) | 470 // O(n) walks.) |
| 463 std::multimap<int, int> scrollbar_map_; | 471 std::multimap<int, int> scrollbar_map_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 | 509 |
| 502 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 510 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 503 | 511 |
| 504 private: | 512 private: |
| 505 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 513 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 506 }; | 514 }; |
| 507 | 515 |
| 508 } // namespace cc | 516 } // namespace cc |
| 509 | 517 |
| 510 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 518 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |