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

Unified Diff: cc/quads/render_pass.h

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/output/software_renderer.cc ('k') | cc/quads/render_pass_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/render_pass.h
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index 552643d69b02c9bca1a6c25903e0a87f2c0429ff..3f7775d97cfc583ce65fbb9583024030fbc10817 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -7,11 +7,11 @@
#include <stddef.h>
+#include <unordered_map>
#include <utility>
#include <vector>
#include "base/callback.h"
-#include "base/containers/hash_tables.h"
#include "base/hash.h"
#include "base/macros.h"
#include "cc/base/cc_export.h"
@@ -134,20 +134,10 @@ class CC_EXPORT RenderPass {
DISALLOW_COPY_AND_ASSIGN(RenderPass);
};
-} // namespace cc
+using RenderPassList = std::vector<scoped_ptr<RenderPass>>;
+using RenderPassIdHashMap =
+ std::unordered_map<RenderPassId, RenderPass*, RenderPassIdHash>;
-namespace BASE_HASH_NAMESPACE {
-template <>
-struct hash<cc::RenderPassId> {
- size_t operator()(cc::RenderPassId key) const {
- return base::HashInts(key.layer_id, static_cast<int>(key.index));
- }
-};
-} // namespace BASE_HASH_NAMESPACE
-
-namespace cc {
-typedef std::vector<scoped_ptr<RenderPass>> RenderPassList;
-typedef base::hash_map<RenderPassId, RenderPass*> RenderPassIdHashMap;
} // namespace cc
#endif // CC_QUADS_RENDER_PASS_H_
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/quads/render_pass_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698