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

Side by Side Diff: cc/layers/layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <unordered_map>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/callback.h" 16 #include "base/callback.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
18 #include "base/observer_list.h" 19 #include "base/observer_list.h"
19 #include "cc/animation/layer_animation_controller.h" 20 #include "cc/animation/layer_animation_controller.h"
20 #include "cc/animation/layer_animation_value_observer.h" 21 #include "cc/animation/layer_animation_value_observer.h"
21 #include "cc/animation/layer_animation_value_provider.h" 22 #include "cc/animation/layer_animation_value_provider.h"
22 #include "cc/base/cc_export.h" 23 #include "cc/base/cc_export.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 class LayerUpdate; 77 class LayerUpdate;
77 } // namespace proto 78 } // namespace proto
78 79
79 // Base class for composited layers. Special layer types are derived from 80 // Base class for composited layers. Special layer types are derived from
80 // this class. 81 // this class.
81 class CC_EXPORT Layer : public base::RefCounted<Layer>, 82 class CC_EXPORT Layer : public base::RefCounted<Layer>,
82 public LayerAnimationValueObserver, 83 public LayerAnimationValueObserver,
83 public LayerAnimationValueProvider { 84 public LayerAnimationValueProvider {
84 public: 85 public:
85 typedef LayerList LayerListType; 86 typedef LayerList LayerListType;
86 typedef base::hash_map<int, scoped_refptr<Layer>> LayerIdMap; 87 typedef std::unordered_map<int, scoped_refptr<Layer>> LayerIdMap;
87 88
88 enum LayerIdLabels { 89 enum LayerIdLabels {
89 INVALID_ID = -1, 90 INVALID_ID = -1,
90 }; 91 };
91 92
92 static scoped_refptr<Layer> Create(const LayerSettings& settings); 93 static scoped_refptr<Layer> Create(const LayerSettings& settings);
93 94
94 int id() const { return layer_id_; } 95 int id() const { return layer_id_; }
95 96
96 Layer* RootLayer(); 97 Layer* RootLayer();
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 std::vector<FrameTimingRequest> frame_timing_requests_; 792 std::vector<FrameTimingRequest> frame_timing_requests_;
792 bool frame_timing_requests_dirty_; 793 bool frame_timing_requests_dirty_;
793 bool is_hidden_from_property_trees_; 794 bool is_hidden_from_property_trees_;
794 795
795 DISALLOW_COPY_AND_ASSIGN(Layer); 796 DISALLOW_COPY_AND_ASSIGN(Layer);
796 }; 797 };
797 798
798 } // namespace cc 799 } // namespace cc
799 800
800 #endif // CC_LAYERS_LAYER_H_ 801 #endif // CC_LAYERS_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698