| 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> |
| 11 #include <unordered_map> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/containers/hash_tables.h" | |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "cc/base/synced_property.h" | 16 #include "cc/base/synced_property.h" |
| 17 #include "cc/input/layer_selection_bound.h" | 17 #include "cc/input/layer_selection_bound.h" |
| 18 #include "cc/layers/layer_impl.h" | 18 #include "cc/layers/layer_impl.h" |
| 19 #include "cc/output/begin_frame_args.h" | 19 #include "cc/output/begin_frame_args.h" |
| 20 #include "cc/output/renderer.h" | 20 #include "cc/output/renderer.h" |
| 21 #include "cc/output/swap_promise.h" | 21 #include "cc/output/swap_promise.h" |
| 22 #include "cc/resources/ui_resource_client.h" | 22 #include "cc/resources/ui_resource_client.h" |
| 23 #include "cc/trees/layer_tree_host_impl.h" | 23 #include "cc/trees/layer_tree_host_impl.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; | 476 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; |
| 477 float min_page_scale_factor_; | 477 float min_page_scale_factor_; |
| 478 float max_page_scale_factor_; | 478 float max_page_scale_factor_; |
| 479 | 479 |
| 480 float device_scale_factor_; | 480 float device_scale_factor_; |
| 481 float painted_device_scale_factor_; | 481 float painted_device_scale_factor_; |
| 482 | 482 |
| 483 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 483 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
| 484 | 484 |
| 485 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 485 using LayerIdMap = std::unordered_map<int, LayerImpl*>; |
| 486 LayerIdMap layer_id_map_; | 486 LayerIdMap layer_id_map_; |
| 487 | 487 |
| 488 base::hash_map<uint64_t, ElementLayers> element_layers_map_; | 488 std::unordered_map<uint64_t, ElementLayers> element_layers_map_; |
| 489 | 489 |
| 490 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 490 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
| 491 // the subset of clip layers that act as scrolling containers. (This is | 491 // the subset of clip layers that act as scrolling containers. (This is |
| 492 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) | 492 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) |
| 493 base::hash_map<int, int> clip_scroll_map_; | 493 std::unordered_map<int, int> clip_scroll_map_; |
| 494 | 494 |
| 495 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there | 495 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there |
| 496 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is | 496 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is |
| 497 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid | 497 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid |
| 498 // O(n) walks.) | 498 // O(n) walks.) |
| 499 std::multimap<int, int> scrollbar_map_; | 499 std::multimap<int, int> scrollbar_map_; |
| 500 | 500 |
| 501 std::vector<PictureLayerImpl*> picture_layers_; | 501 std::vector<PictureLayerImpl*> picture_layers_; |
| 502 std::vector<LayerImpl*> layers_with_copy_output_request_; | 502 std::vector<LayerImpl*> layers_with_copy_output_request_; |
| 503 std::vector<LayerImpl*> surface_layers_; | 503 std::vector<LayerImpl*> surface_layers_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 539 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 540 | 540 |
| 541 private: | 541 private: |
| 542 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 542 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 543 }; | 543 }; |
| 544 | 544 |
| 545 } // namespace cc | 545 } // namespace cc |
| 546 | 546 |
| 547 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 547 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |