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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/raster_tile_priority_queue.h" 5 #include "cc/resources/raster_tile_priority_queue.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 private: 62 private:
63 TreePriority tree_priority_; 63 TreePriority tree_priority_;
64 }; 64 };
65 65
66 WhichTree HigherPriorityTree( 66 WhichTree HigherPriorityTree(
67 TreePriority tree_priority, 67 TreePriority tree_priority,
68 const PictureLayerImpl::LayerRasterTileIterator* active_iterator, 68 const PictureLayerImpl::LayerRasterTileIterator* active_iterator,
69 const PictureLayerImpl::LayerRasterTileIterator* pending_iterator, 69 const PictureLayerImpl::LayerRasterTileIterator* pending_iterator,
70 const Tile* shared_tile) { 70 const Tile* shared_tile) {
71 switch (tree_priority) { 71 switch (tree_priority) {
72 case SMOOTHNESS_TAKES_PRIORITY: 72 case SMOOTHNESS_TAKES_PRIORITY: {
73 const Tile* active_tile = shared_tile ? shared_tile : **active_iterator;
74 const Tile* pending_tile = shared_tile ? shared_tile : **pending_iterator;
75
76 const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
77 const TilePriority& pending_priority =
78 pending_tile->priority(PENDING_TREE);
79
80 // If we're down to eventually bin tiles on the active tree, process the
81 // pending tree to allow tiles required for activation to be initialized
82 // when memory policy only allows prepaint.
83 if (active_priority.priority_bin == TilePriority::EVENTUALLY &&
84 pending_priority.priority_bin == TilePriority::NOW) {
85 return PENDING_TREE;
86 }
73 return ACTIVE_TREE; 87 return ACTIVE_TREE;
88 }
74 case NEW_CONTENT_TAKES_PRIORITY: 89 case NEW_CONTENT_TAKES_PRIORITY:
75 return PENDING_TREE; 90 return PENDING_TREE;
76 case SAME_PRIORITY_FOR_BOTH_TREES: { 91 case SAME_PRIORITY_FOR_BOTH_TREES: {
77 const Tile* active_tile = shared_tile ? shared_tile : **active_iterator; 92 const Tile* active_tile = shared_tile ? shared_tile : **active_iterator;
78 const Tile* pending_tile = shared_tile ? shared_tile : **pending_iterator; 93 const Tile* pending_tile = shared_tile ? shared_tile : **pending_iterator;
79 94
80 const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE); 95 const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
81 const TilePriority& pending_priority = 96 const TilePriority& pending_priority =
82 pending_tile->priority(PENDING_TREE); 97 pending_tile->priority(PENDING_TREE);
83 98
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return PENDING_TREE; 243 return PENDING_TREE;
229 if (!pending_iterator) 244 if (!pending_iterator)
230 return ACTIVE_TREE; 245 return ACTIVE_TREE;
231 246
232 // Now both iterators have tiles, so we have to decide based on tree priority. 247 // Now both iterators have tiles, so we have to decide based on tree priority.
233 return HigherPriorityTree( 248 return HigherPriorityTree(
234 tree_priority, &active_iterator, &pending_iterator, nullptr); 249 tree_priority, &active_iterator, &pending_iterator, nullptr);
235 } 250 }
236 251
237 } // namespace cc 252 } // namespace cc
OLDNEW
« 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