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

Unified Diff: cc/tile_manager.cc

Issue 11879007: cc: Move tile sorting into separate function and add trace event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index e7583bd20e40e03b4d551c3c98b004249d304ed5..b10e1447978b6c75443b8cd5e0671740c2512d4a 100644
--- a/cc/tile_manager.cc
+++ b/cc/tile_manager.cc
@@ -166,6 +166,13 @@ public:
}
};
+void TileManager::SortTiles() {
+ TRACE_EVENT0("cc", "TileManager::SortTiles");
+
+ // Sort by bin, resolution and time until needed.
+ std::sort(tiles_.begin(), tiles_.end(), BinComparator());
+}
+
void TileManager::ManageTiles() {
TRACE_EVENT0("cc", "TileManager::ManageTiles");
manage_tiles_pending_ = false;
@@ -220,8 +227,7 @@ void TileManager::ManageTiles() {
mts.bin = bin_map[mts.bin];
}
- // Sort by bin.
- std::sort(tiles_.begin(), tiles_.end(), BinComparator());
+ SortTiles();
// Assign gpu memory and determine what tiles need to be rasterized.
AssignGpuMemoryToTiles();
« no previous file with comments | « cc/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698