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

Unified Diff: cc/resources/raster_tile_priority_queue_all.cc

Issue 1064743003: cc: Consider resolution when checking HigherPriorityTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_unittest.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_all.cc
diff --git a/cc/resources/raster_tile_priority_queue_all.cc b/cc/resources/raster_tile_priority_queue_all.cc
index 9baa9b32de7177e67738a675a78dda8f1cf65779..9b1ce90ef9d9b1522757399e1ee2768f4fd27948 100644
--- a/cc/resources/raster_tile_priority_queue_all.cc
+++ b/cc/resources/raster_tile_priority_queue_all.cc
@@ -86,12 +86,21 @@ WhichTree HigherPriorityTree(TreePriority tree_priority,
const TilingSetRasterQueueAll* active_queue,
const TilingSetRasterQueueAll* pending_queue,
const Tile* shared_tile) {
+ // In cases when we're given an active tile with a non ideal active resolution
+ // (or pending tile with non ideal pending resolution), we should return the
+ // other tree. The reason for this is that tiling set iterators will not
+ // return non ideal tiles and the only way we get here is if we're skipping
+ // twin tiles, but since it's non-ideal on the twin, we shouldn't skip it.
+ // TODO(vmpstr): Remove when tiles aren't shared.
+ const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
+ const Tile* pending_tile = shared_tile ? shared_tile : pending_queue->Top();
+ if (active_tile->priority(ACTIVE_TREE).resolution == NON_IDEAL_RESOLUTION)
+ return PENDING_TREE;
+ if (pending_tile->priority(PENDING_TREE).resolution == NON_IDEAL_RESOLUTION)
+ return ACTIVE_TREE;
+
switch (tree_priority) {
case SMOOTHNESS_TAKES_PRIORITY: {
- const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
- const Tile* pending_tile =
- shared_tile ? shared_tile : pending_queue->Top();
-
const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
const TilePriority& pending_priority =
pending_tile->priority(PENDING_TREE);
@@ -108,10 +117,6 @@ WhichTree HigherPriorityTree(TreePriority tree_priority,
case NEW_CONTENT_TAKES_PRIORITY:
return PENDING_TREE;
case SAME_PRIORITY_FOR_BOTH_TREES: {
- const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
- const Tile* pending_tile =
- shared_tile ? shared_tile : pending_queue->Top();
-
const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
const TilePriority& pending_priority =
pending_tile->priority(PENDING_TREE);
« no previous file with comments | « no previous file | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698