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

Side by Side Diff: cc/tiles/raster_tile_priority_queue_all.cc

Issue 2404423002: cc: Make pending visible rect active tree tiles be in the NOW bin. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/tile_manager_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/tiles/raster_tile_priority_queue_all.h" 5 #include "cc/tiles/raster_tile_priority_queue_all.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/tiles/tiling_set_raster_queue_all.h" 8 #include "cc/tiles/tiling_set_raster_queue_all.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return active_queues_; 138 return active_queues_;
139 139
140 const PrioritizedTile& active_tile = active_queues_.front()->Top(); 140 const PrioritizedTile& active_tile = active_queues_.front()->Top();
141 const PrioritizedTile& pending_tile = pending_queues_.front()->Top(); 141 const PrioritizedTile& pending_tile = pending_queues_.front()->Top();
142 142
143 const TilePriority& active_priority = active_tile.priority(); 143 const TilePriority& active_priority = active_tile.priority();
144 const TilePriority& pending_priority = pending_tile.priority(); 144 const TilePriority& pending_priority = pending_tile.priority();
145 145
146 switch (tree_priority_) { 146 switch (tree_priority_) {
147 case SMOOTHNESS_TAKES_PRIORITY: { 147 case SMOOTHNESS_TAKES_PRIORITY: {
148 // If we're down to eventually bin tiles on the active tree and there 148 // If we're down to soon bin tiles on the active tree and there
149 // is a pending tree, process the entire pending tree to allow tiles 149 // is a pending tree, process the now tiles in the pending tree to allow
150 // required for activation to be initialized when memory policy only 150 // tiles required for activation to be initialized when memory policy only
151 // allows prepaint. The eventually bin tiles on the active tree are 151 // allows prepaint. The soon/eventually bin tiles on the active tree are
152 // lowest priority since that work is likely to be thrown away when 152 // lowest priority since that work is likely to be thrown away when we
153 // we activate. 153 // activate.
154 if (active_priority.priority_bin == TilePriority::EVENTUALLY) 154 if (active_priority.priority_bin >= TilePriority::SOON &&
155 pending_priority.priority_bin == TilePriority::NOW) {
155 return pending_queues_; 156 return pending_queues_;
157 }
156 return active_queues_; 158 return active_queues_;
157 } 159 }
158 case NEW_CONTENT_TAKES_PRIORITY: { 160 case NEW_CONTENT_TAKES_PRIORITY: {
159 // If we're down to soon bin tiles on the pending tree, process the 161 // If we're down to soon bin tiles on the pending tree, process the
160 // active tree to allow tiles required for activation to be initialized 162 // active tree to allow tiles required for activation to be initialized
161 // when memory policy only allows prepaint. Note that active required for 163 // when memory policy only allows prepaint. Note that active required for
162 // activation tiles might come from either now or soon bins. 164 // activation tiles might come from either now or soon bins.
163 if (pending_priority.priority_bin >= TilePriority::SOON && 165 if (pending_priority.priority_bin >= TilePriority::SOON &&
164 active_priority.priority_bin <= TilePriority::SOON) { 166 active_priority.priority_bin <= TilePriority::SOON) {
165 return active_queues_; 167 return active_queues_;
166 } 168 }
167 return pending_queues_; 169 return pending_queues_;
168 } 170 }
169 case SAME_PRIORITY_FOR_BOTH_TREES: { 171 case SAME_PRIORITY_FOR_BOTH_TREES: {
170 if (active_priority.IsHigherPriorityThan(pending_priority)) 172 if (active_priority.IsHigherPriorityThan(pending_priority))
171 return active_queues_; 173 return active_queues_;
172 return pending_queues_; 174 return pending_queues_;
173 } 175 }
174 default: 176 default:
175 NOTREACHED(); 177 NOTREACHED();
176 return active_queues_; 178 return active_queues_;
177 } 179 }
178 } 180 }
179 181
180 } // namespace cc 182 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698