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

Unified Diff: cc/tiles/picture_layer_tiling.cc

Issue 2825853002: Improvements to uses of base::SmallMap (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/tiles/picture_layer_tiling.cc
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 344cb32b6c04cc92ce00887c8862c30add532d73..fcd6ff2b69cb7621da29d56b09ec65403b335912 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -257,11 +257,11 @@ void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_invalidation,
// twin, so it's slated for removal in the future.
if (live_tiles_rect_.IsEmpty())
return;
- // Pick 16 for the size of the SmallMap before it promotes to a unordered_map.
- // 4x4 tiles should cover most small invalidations, and walking a vector of
- // 16 is fast enough. If an invalidation is huge we will fall back to a
- // unordered_map instead of a vector in the SmallMap.
- base::SmallMap<std::unordered_map<TileMapKey, gfx::Rect, TileMapKeyHash>, 16>
+ // Pick 16 for the size of the small_map before it promotes to a
+ // unordered_map. 4x4 tiles should cover most small invalidations, and
+ // walking a vector of 16 is fast enough. If an invalidation is huge we will
+ // fall back to a unordered_map instead of a vector in the small_map.
+ base::small_map<std::unordered_map<TileMapKey, gfx::Rect, TileMapKeyHash>, 16>
danakj 2017/04/18 21:35:50 This should be a flat_map too
remove_tiles;
gfx::Rect expanded_live_tiles_rect =
tiling_data_.ExpandRectToTileBounds(live_tiles_rect_);

Powered by Google App Engine
This is Rietveld 408576698