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

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: rebasing to tip of tree 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.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index 6137aabec53371ce798052ea87e40dcf5ee32a3f..5c2cf6d1a805c999e213286e42359d21cc113ede 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);
« no previous file with comments | « cc/tile.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698