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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue 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 | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 3ebc475fc4d7570641d205d1ec796bde35e32978..6653e948eb5acca20d4c1c0992f9b69aeeb12005 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -11,9 +11,10 @@
#include <limits>
#include <map>
#include <set>
+#include <unordered_map>
+#include <utility>
#include "base/auto_reset.h"
-#include "base/containers/hash_tables.h"
#include "base/containers/small_map.h"
#include "base/json/json_writer.h"
#include "base/metrics/histogram.h"
@@ -1189,7 +1190,8 @@ void LayerTreeHostImpl::RemoveRenderPasses(FrameData* frame) {
std::set<RenderPassId> pass_exists;
// A set of RenderPassDrawQuads that we have seen (stored by the RenderPasses
// they refer to).
- base::SmallMap<base::hash_map<RenderPassId, int>> pass_references;
+ base::SmallMap<std::unordered_map<RenderPassId, int, RenderPassIdHash>>
+ pass_references;
// Iterate RenderPasses in draw order, removing empty render passes (except
// the root RenderPass).
@@ -3404,9 +3406,8 @@ void LayerTreeHostImpl::RegisterScrollbarAnimationController(
return;
if (ScrollbarAnimationControllerForId(scroll_layer_id))
return;
- scrollbar_animation_controllers_.add(
- scroll_layer_id,
- active_tree_->CreateScrollbarAnimationController(scroll_layer_id));
+ scrollbar_animation_controllers_[scroll_layer_id] =
+ active_tree_->CreateScrollbarAnimationController(scroll_layer_id);
}
void LayerTreeHostImpl::UnregisterScrollbarAnimationController(
@@ -3423,7 +3424,7 @@ LayerTreeHostImpl::ScrollbarAnimationControllerForId(
auto i = scrollbar_animation_controllers_.find(scroll_layer_id);
if (i == scrollbar_animation_controllers_.end())
return nullptr;
- return i->second;
+ return i->second.get();
}
void LayerTreeHostImpl::PostDelayedScrollbarAnimationTask(
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698