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

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..eaedeb1af87fc32986096bdf1ac932222f299a89 100644
--- a/cc/resources/raster_tile_priority_queue_all.cc
+++ b/cc/resources/raster_tile_priority_queue_all.cc
@@ -86,12 +86,15 @@ WhichTree HigherPriorityTree(TreePriority tree_priority,
const TilingSetRasterQueueAll* active_queue,
const TilingSetRasterQueueAll* pending_queue,
const Tile* shared_tile) {
+ const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
enne (OOO) 2015/04/15 20:47:02 Can you leave a comment about why you're doing thi
vmpstr 2015/04/15 21:05:24 Done.
+ 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 +111,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