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

Unified Diff: cc/resources/raster_tile_priority_queue.cc

Issue 651503004: cc: Bump up pending tree now tiles order for smoothness mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 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/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/raster_tile_priority_queue.cc
diff --git a/cc/resources/raster_tile_priority_queue.cc b/cc/resources/raster_tile_priority_queue.cc
index cbe90f9498d8ff27934312490f95905660e998ff..3eee94137201323c06aff1a34ef992bd7b1eaae6 100644
--- a/cc/resources/raster_tile_priority_queue.cc
+++ b/cc/resources/raster_tile_priority_queue.cc
@@ -69,8 +69,23 @@ WhichTree HigherPriorityTree(
const PictureLayerImpl::LayerRasterTileIterator* pending_iterator,
const Tile* shared_tile) {
switch (tree_priority) {
- case SMOOTHNESS_TAKES_PRIORITY:
+ case SMOOTHNESS_TAKES_PRIORITY: {
+ const Tile* active_tile = shared_tile ? shared_tile : **active_iterator;
+ const Tile* pending_tile = shared_tile ? shared_tile : **pending_iterator;
+
+ const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
+ const TilePriority& pending_priority =
+ pending_tile->priority(PENDING_TREE);
+
+ // If we're down to eventually bin tiles on the active tree, process the
+ // pending tree to allow tiles required for activation to be initialized
+ // when memory policy only allows prepaint.
+ if (active_priority.priority_bin == TilePriority::EVENTUALLY &&
+ pending_priority.priority_bin == TilePriority::NOW) {
+ return PENDING_TREE;
+ }
return ACTIVE_TREE;
+ }
case NEW_CONTENT_TAKES_PRIORITY:
return PENDING_TREE;
case SAME_PRIORITY_FOR_BOTH_TREES: {
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698