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

Unified Diff: cc/surfaces/surface_manager.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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_manager.h
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 7466501545b022a27074c8cc0414a2f3295a5e22..6619f9c80220c3080e992f7e5d819508650d7b42 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -8,9 +8,10 @@
#include <stdint.h>
#include <list>
+#include <unordered_map>
+#include <unordered_set>
#include <vector>
-#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
@@ -60,7 +61,7 @@ class CC_SURFACES_EXPORT SurfaceManager {
private:
void GarbageCollectSurfaces();
- typedef base::hash_map<SurfaceId, Surface*> SurfaceMap;
+ typedef std::unordered_map<SurfaceId, Surface*, SurfaceIdHash> SurfaceMap;
SurfaceMap surface_map_;
base::ObserverList<SurfaceDamageObserver> observer_list_;
base::ThreadChecker thread_checker_;
@@ -72,12 +73,12 @@ class CC_SURFACES_EXPORT SurfaceManager {
// Set of SurfaceSequences that have been satisfied by a frame but not yet
// waited on.
- base::hash_set<SurfaceSequence> satisfied_sequences_;
+ std::unordered_set<SurfaceSequence, SurfaceSequenceHash> satisfied_sequences_;
// Set of valid surface ID namespaces. When a namespace is removed from
// this set, any remaining sequences with that namespace are considered
// satisfied.
- base::hash_set<uint32_t> valid_surface_id_namespaces_;
+ std::unordered_set<uint32_t> valid_surface_id_namespaces_;
DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
};

Powered by Google App Engine
This is Rietveld 408576698