summaryrefslogtreecommitdiffstats
path: root/cc/quads
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2016-01-20 17:08:38 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-21 01:10:07 +0000
commit3f37f7f1459e7b5a452c0e433493e0a6e9649ca7 (patch)
treed37f361db93e0f91fe3dedee38851941f5586020 /cc/quads
parent26a2b4883c04424a86abcda3d7333505eb1d032d (diff)
downloadchromium_src-3f37f7f1459e7b5a452c0e433493e0a6e9649ca7.zip
chromium_src-3f37f7f1459e7b5a452c0e433493e0a6e9649ca7.tar.gz
chromium_src-3f37f7f1459e7b5a452c0e433493e0a6e9649ca7.tar.bz2
Allow std::unordered_*.
base::hash_* is, as a transition step, implemented in terms of std::unordered_*. Later commits will convert existing uses. Also fix a host of IWYU problems that arose from this CL. (NOPRESUBMIT because the wstring presubmit check is overzealous and complains about the reference to wstring in the comment.) NOPRESUBMIT=true BUG=576864 TBR=derat@chromium.org,blundell@chromium.org,jbauman@chromium.org,dalecurtis@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1502373009 Cr-Commit-Position: refs/heads/master@{#370553}
Diffstat (limited to 'cc/quads')
-rw-r--r--cc/quads/render_pass.h3
-rw-r--r--cc/quads/render_pass_id.cc6
-rw-r--r--cc/quads/render_pass_id.h1
3 files changed, 6 insertions, 4 deletions
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index 9ba727e..552643d 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
+#include "base/hash.h"
#include "base/macros.h"
#include "cc/base/cc_export.h"
#include "cc/base/list_container.h"
@@ -139,7 +140,7 @@ namespace BASE_HASH_NAMESPACE {
template <>
struct hash<cc::RenderPassId> {
size_t operator()(cc::RenderPassId key) const {
- return base::HashPair(key.layer_id, static_cast<int>(key.index));
+ return base::HashInts(key.layer_id, static_cast<int>(key.index));
}
};
} // namespace BASE_HASH_NAMESPACE
diff --git a/cc/quads/render_pass_id.cc b/cc/quads/render_pass_id.cc
index 0f53e81..742c191 100644
--- a/cc/quads/render_pass_id.cc
+++ b/cc/quads/render_pass_id.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "cc/quads/render_pass_id.h"
+
#include <stddef.h>
-#include "cc/quads/render_pass_id.h"
+#include "base/hash.h"
namespace cc {
@@ -12,7 +14,7 @@ void* RenderPassId::AsTracingId() const {
static_assert(sizeof(size_t) <= sizeof(void*), // NOLINT
"size of size_t should not be greater than that of a pointer");
return reinterpret_cast<void*>(
- base::HashPair(layer_id, static_cast<int>(index)));
+ base::HashInts(layer_id, static_cast<int>(index)));
}
} // namespace cc
diff --git a/cc/quads/render_pass_id.h b/cc/quads/render_pass_id.h
index 11cb777..5dff1e1 100644
--- a/cc/quads/render_pass_id.h
+++ b/cc/quads/render_pass_id.h
@@ -9,7 +9,6 @@
#include <tuple>
-#include "base/containers/hash_tables.h"
#include "cc/base/cc_export.h"
namespace cc {