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

Unified Diff: cc/paint/discardable_image_map.cc

Issue 2847553002: cc: Replace some instances of unordered_map with base::flat_map. (Closed)
Patch Set: Created 3 years, 8 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/paint/discardable_image_map.cc
diff --git a/cc/paint/discardable_image_map.cc b/cc/paint/discardable_image_map.cc
index c1a3b57ccb532bfc4affac0e30c903625af7c0ca..04b6155338d66eef061192ae32eeb7176aae1097 100644
--- a/cc/paint/discardable_image_map.cc
+++ b/cc/paint/discardable_image_map.cc
@@ -10,6 +10,7 @@
#include <limits>
#include "base/containers/adapters.h"
+#include "base/containers/flat_map.h"
#include "base/memory/ptr_util.h"
#include "cc/base/math_util.h"
#include "cc/paint/display_item_list.h"
@@ -63,7 +64,7 @@ class DiscardableImagesMetadataCanvas : public SkNWayCanvas {
int width,
int height,
std::vector<std::pair<DrawImage, gfx::Rect>>* image_set,
- std::unordered_map<ImageId, gfx::Rect>* image_id_to_rect)
+ base::flat_map<ImageId, gfx::Rect>* image_id_to_rect)
: SkNWayCanvas(width, height),
image_set_(image_set),
image_id_to_rect_(image_id_to_rect),
@@ -247,7 +248,7 @@ class DiscardableImagesMetadataCanvas : public SkNWayCanvas {
}
std::vector<std::pair<DrawImage, gfx::Rect>>* image_set_;
- std::unordered_map<ImageId, gfx::Rect>* image_id_to_rect_;
+ base::flat_map<ImageId, gfx::Rect>* image_id_to_rect_;
const SkRect canvas_bounds_;
const gfx::Size canvas_size_;
std::vector<SkPaint> saved_paints_;

Powered by Google App Engine
This is Rietveld 408576698