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

Unified Diff: cc/tile_manager.h

Issue 12084031: A host of micro-optimizations and a refactor of TimeForBoundsToIntersect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged to tip of tree and refactored TilePriority::TimeForBoundsToIntersect 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
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index 6f51dea5a44992e9f34b9cf5627f101cb7416b4f..574c14a9444aa3f8ba4e44f146a8d84788d0ebc6 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -117,13 +117,22 @@ class CC_EXPORT TileManager {
void RegisterTile(Tile* tile);
void UnregisterTile(Tile* tile);
void WillModifyTilePriority(
- Tile* tile, WhichTree tree, const TilePriority& new_priority);
+ Tile* tile, WhichTree tree, const TilePriority& new_priority) {
+ // TODO(nduca): Do something smarter if reprioritization turns out to be
+ // costly.
+ ScheduleManageTiles();
+ }
private:
void SortTiles();
void AssignGpuMemoryToTiles();
void FreeResourcesForTile(Tile* tile);
- void ScheduleManageTiles();
+ void ScheduleManageTiles() {
+ if (manage_tiles_pending_)
+ return;
+ client_->ScheduleManageTiles();
+ manage_tiles_pending_ = true;
+ }
void DispatchMoreTasks();
void GatherPixelRefsForTile(Tile* tile);
void DispatchImageDecodeTasksForTile(Tile* tile);

Powered by Google App Engine
This is Rietveld 408576698