Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4034)

Unified Diff: cc/trees/property_tree.h

Issue 2848243003: cc : Replace unordered_maps with flat_map in property trees (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/property_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.h
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index 36c1722a415cb1d93fe338d22ff9be2a40c123f6..86705350dbaea9c6f2d2cb90712b190fd39b367e 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -507,9 +507,9 @@ class CC_EXPORT ScrollTree final : public PropertyTree<ScrollNode> {
ScrollNode* FindNodeFromElementId(ElementId id);
private:
- using ScrollOffsetMap = std::unordered_map<int, gfx::ScrollOffset>;
+ using ScrollOffsetMap = base::flat_map<int, gfx::ScrollOffset>;
using SyncedScrollOffsetMap =
- std::unordered_map<int, scoped_refptr<SyncedScrollOffset>>;
+ base::flat_map<int, scoped_refptr<SyncedScrollOffset>>;
int currently_scrolling_node_id_;
@@ -646,12 +646,9 @@ class CC_EXPORT PropertyTrees final {
// from layer id to the respective property node. Completing that work is
// pending the launch of Slimming Paint v2 and reworking UI compositor logic
// to produce cc property trees and these maps.
- std::unordered_map<ElementId, int, ElementIdHash>
- element_id_to_effect_node_index;
- std::unordered_map<ElementId, int, ElementIdHash>
- element_id_to_scroll_node_index;
- std::unordered_map<ElementId, int, ElementIdHash>
- element_id_to_transform_node_index;
+ base::flat_map<ElementId, int> element_id_to_effect_node_index;
+ base::flat_map<ElementId, int> element_id_to_scroll_node_index;
+ base::flat_map<ElementId, int> element_id_to_transform_node_index;
std::vector<int> always_use_active_tree_opacity_effect_ids;
TransformTree transform_tree;
« no previous file with comments | « no previous file | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698