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

Side by Side Diff: cc/layers/layer_proto_converter.h

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LAYERS_LAYER_PROTO_CONVERTER_H_ 5 #ifndef CC_LAYERS_LAYER_PROTO_CONVERTER_H_
6 #define CC_LAYERS_LAYER_PROTO_CONVERTER_H_ 6 #define CC_LAYERS_LAYER_PROTO_CONVERTER_H_
7 7
8 #include <unordered_map>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
10 #include "cc/layers/layer.h" 12 #include "cc/layers/layer.h"
11 13
12 namespace cc { 14 namespace cc {
13 15
14 namespace proto { 16 namespace proto {
15 class LayerNode; 17 class LayerNode;
16 class LayerUpdate; 18 class LayerUpdate;
17 } 19 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 private: 57 private:
56 LayerProtoConverter(); 58 LayerProtoConverter();
57 ~LayerProtoConverter(); 59 ~LayerProtoConverter();
58 60
59 // This method is the inner recursive function for SerializeLayerProperties 61 // This method is the inner recursive function for SerializeLayerProperties
60 // declared above. 62 // declared above.
61 static void RecursivelySerializeLayerProperties( 63 static void RecursivelySerializeLayerProperties(
62 Layer* root_layer, 64 Layer* root_layer,
63 proto::LayerUpdate* layer_update); 65 proto::LayerUpdate* layer_update);
64 66
65 using LayerIdMap = base::hash_map<int, scoped_refptr<Layer>>; 67 using LayerIdMap = std::unordered_map<int, scoped_refptr<Layer>>;
66 // Start at |layer| and recursively add |layer| and all its children and 68 // Start at |layer| and recursively add |layer| and all its children and
67 // special layers to |layer_id_map|. 69 // special layers to |layer_id_map|.
68 static void RecursivelyFindAllLayers(const scoped_refptr<Layer>& layer, 70 static void RecursivelyFindAllLayers(const scoped_refptr<Layer>& layer,
69 LayerIdMap* layer_id_map); 71 LayerIdMap* layer_id_map);
70 }; 72 };
71 73
72 } // namespace cc 74 } // namespace cc
73 75
74 #endif // CC_LAYERS_LAYER_PROTO_CONVERTER_H_ 76 #endif // CC_LAYERS_LAYER_PROTO_CONVERTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698