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(); |