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

Unified Diff: cc/surfaces/surface_aggregator.cc

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: rebasing 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_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index d60a2172b5dffe0e51b100b7b9c74b84dd3f054d..593f58967e8070cc2f91e4ef8a99657390353fc2 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -122,10 +122,11 @@ static void UnrefHelper(base::WeakPtr<SurfaceFactory> surface_factory,
RenderPassId SurfaceAggregator::RemapPassId(RenderPassId surface_local_pass_id,
SurfaceId surface_id) {
- RenderPassIdAllocator* allocator = render_pass_allocator_map_.get(surface_id);
+ RenderPassIdAllocator* allocator =
danakj 2016/01/26 23:53:32 You could write this code a bit shorter now I gues
lfg 2016/01/27 00:53:14 Done.
+ render_pass_allocator_map_[surface_id].get();
if (!allocator) {
allocator = new RenderPassIdAllocator(&next_render_pass_id_);
- render_pass_allocator_map_.set(surface_id, make_scoped_ptr(allocator));
+ render_pass_allocator_map_[surface_id] = make_scoped_ptr(allocator);
}
allocator->AddKnownPass(surface_local_pass_id);
return allocator->Remap(surface_local_pass_id);

Powered by Google App Engine
This is Rietveld 408576698