Index: cc/surfaces/surface_aggregator.cc |
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc |
index d60a2172b5dffe0e51b100b7b9c74b84dd3f054d..f78ea1219f7ab00b99f11ec7658a50c6928ab55f 100644 |
--- a/cc/surfaces/surface_aggregator.cc |
+++ b/cc/surfaces/surface_aggregator.cc |
@@ -9,7 +9,6 @@ |
#include <map> |
#include "base/bind.h" |
-#include "base/containers/hash_tables.h" |
#include "base/logging.h" |
#include "base/macros.h" |
#include "base/stl_util.h" |
@@ -107,7 +106,7 @@ class SurfaceAggregator::RenderPassIdAllocator { |
} |
private: |
- base::hash_map<RenderPassId, int> id_to_index_map_; |
+ std::unordered_map<RenderPassId, int, RenderPassIdHash> id_to_index_map_; |
int* next_index_; |
DISALLOW_COPY_AND_ASSIGN(RenderPassIdAllocator); |
@@ -122,10 +121,13 @@ 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); |
- if (!allocator) { |
+ RenderPassIdAllocator* allocator; |
+ auto iter = render_pass_allocator_map_.find(surface_id); |
+ if (iter == render_pass_allocator_map_.end()) { |
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); |
+ } else { |
+ allocator = iter->second.get(); |
} |
allocator->AddKnownPass(surface_local_pass_id); |
return allocator->Remap(surface_local_pass_id); |