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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 1640483003: Switch SurfaceId maps from base::hash_map to std::unordered_map. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments 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
« no previous file with comments | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.h
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 0b640a93280a585a8e5d424f962c1475210aa2f4..c2807585e0391ff383c04913e66a7729c3d1bf50 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -6,6 +6,8 @@
#define CC_SURFACES_SURFACE_AGGREGATOR_H_
#include <set>
+#include <unordered_map>
+#include <unordered_set>
#include "base/containers/hash_tables.h"
#include "base/containers/scoped_ptr_hash_map.h"
@@ -36,7 +38,7 @@ class CC_SURFACES_EXPORT SurfaceAggregatorClient {
class CC_SURFACES_EXPORT SurfaceAggregator {
public:
- typedef base::hash_map<SurfaceId, int> SurfaceIndexMap;
+ using SurfaceIndexMap = std::unordered_map<SurfaceId, int, SurfaceIdHash>;
SurfaceAggregator(SurfaceAggregatorClient* client,
SurfaceManager* manager,
@@ -113,13 +115,16 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
ResourceProvider* provider_;
class RenderPassIdAllocator;
- typedef base::ScopedPtrHashMap<SurfaceId, scoped_ptr<RenderPassIdAllocator>>
- RenderPassIdAllocatorMap;
+ using RenderPassIdAllocatorMap =
+ std::unordered_map<SurfaceId,
+ scoped_ptr<RenderPassIdAllocator>,
+ SurfaceIdHash>;
RenderPassIdAllocatorMap render_pass_allocator_map_;
int next_render_pass_id_;
const bool aggregate_only_damaged_;
- typedef base::hash_map<SurfaceId, int> SurfaceToResourceChildIdMap;
+ using SurfaceToResourceChildIdMap =
+ std::unordered_map<SurfaceId, int, SurfaceIdHash>;
SurfaceToResourceChildIdMap surface_id_to_resource_child_id_;
// The following state is only valid for the duration of one Aggregate call
@@ -137,7 +142,7 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
SurfaceIndexMap contained_surfaces_;
// After surface validation, every Surface in this set is valid.
- base::hash_set<SurfaceId> valid_surfaces_;
+ std::unordered_set<SurfaceId, SurfaceIdHash> valid_surfaces_;
// This is the pass list for the aggregated frame.
RenderPassList* dest_pass_list_;
« no previous file with comments | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698