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

Unified Diff: cc/tiles/raster_tile_priority_queue_all.cc

Issue 2407443002: cc: Properly detect tiles that are needed now. (Closed)
Patch Set: qfix: update Created 4 years, 2 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 | « no previous file | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/raster_tile_priority_queue_all.cc
diff --git a/cc/tiles/raster_tile_priority_queue_all.cc b/cc/tiles/raster_tile_priority_queue_all.cc
index a197b1284380dc9f7c96dbae2bb65543cc550334..e5bea8960a76430e9235180a37c7401026278dd5 100644
--- a/cc/tiles/raster_tile_priority_queue_all.cc
+++ b/cc/tiles/raster_tile_priority_queue_all.cc
@@ -145,13 +145,16 @@ RasterTilePriorityQueueAll::GetNextQueues() const {
switch (tree_priority_) {
case SMOOTHNESS_TAKES_PRIORITY: {
- // If we're down to eventually bin tiles on the active tree and there
- // is a pending tree, process the entire pending tree to allow tiles
- // required for activation to be initialized when memory policy only
- // allows prepaint. The eventually bin tiles on the active tree are
- // lowest priority since that work is likely to be thrown away when
- // we activate.
- if (active_priority.priority_bin == TilePriority::EVENTUALLY)
+ // If we're done with required tiles on the active tree, then process
+ // required tiles on the pending tree. If either the active tree has
+ // required tiles, or none of the trees have required tiles, then process
+ // the active tree by default.
+ bool active_tree_has_required_tiles =
+ active_tile.tile()->required_for_activation() ||
+ active_tile.tile()->required_for_draw();
+ bool pending_tree_has_required_tiles =
+ pending_tile.tile()->required_for_activation();
+ if (!active_tree_has_required_tiles && pending_tree_has_required_tiles)
return pending_queues_;
return active_queues_;
}
« no previous file with comments | « no previous file | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698