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

Side by Side Diff: cc/resources/eviction_tile_priority_queue.cc

Issue 736753002: cc: Implement geometry-based tile eviction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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/eviction_tile_priority_queue.h" 5 #include "cc/resources/eviction_tile_priority_queue.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 const Tile* active_tile = *active_iterator; 206 const Tile* active_tile = *active_iterator;
207 const Tile* pending_tile = *pending_iterator; 207 const Tile* pending_tile = *pending_iterator;
208 if (active_tile == pending_tile) 208 if (active_tile == pending_tile)
209 return ACTIVE_TREE; 209 return ACTIVE_TREE;
210 210
211 const TilePriority& active_priority = 211 const TilePriority& active_priority =
212 active_tile->priority_for_tree_priority(tree_priority); 212 active_tile->priority_for_tree_priority(tree_priority);
213 const TilePriority& pending_priority = 213 const TilePriority& pending_priority =
214 pending_tile->priority_for_tree_priority(tree_priority); 214 pending_tile->priority_for_tree_priority(tree_priority);
215 215
216 if (active_priority.priority_bin == pending_priority.priority_bin) {
vmpstr 2014/11/19 16:47:58 *
217 if (active_tile->required_for_activation()) {
218 if (!pending_tile->required_for_activation())
219 return PENDING_TREE;
220 } else {
221 if (pending_tile->required_for_activation())
222 return ACTIVE_TREE;
223 }
224 }
225
216 if (pending_priority.IsHigherPriorityThan(active_priority)) 226 if (pending_priority.IsHigherPriorityThan(active_priority))
217 return ACTIVE_TREE; 227 return ACTIVE_TREE;
218 return PENDING_TREE; 228 return PENDING_TREE;
219 } 229 }
220 230
221 } // namespace cc 231 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698