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

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

Issue 833243008: Update from https://crrev.com/311145 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_layer_tiling.h » ('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/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 paired_queue->Pop(tree_priority_); 121 paired_queue->Pop(tree_priority_);
122 paired_queues_.push_heap(EvictionOrderComparator(tree_priority_)); 122 paired_queues_.push_heap(EvictionOrderComparator(tree_priority_));
123 } 123 }
124 124
125 EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue() { 125 EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue() {
126 } 126 }
127 127
128 EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue( 128 EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue(
129 const PictureLayerImpl::Pair& layer_pair, 129 const PictureLayerImpl::Pair& layer_pair,
130 TreePriority tree_priority) { 130 TreePriority tree_priority) {
131 if (layer_pair.active) 131 bool skip_shared_out_of_order_tiles = layer_pair.active && layer_pair.pending;
132 active_queue = layer_pair.active->CreateEvictionQueue(tree_priority); 132 if (layer_pair.active) {
133 if (layer_pair.pending) 133 active_queue = make_scoped_ptr(new TilingSetEvictionQueue(
134 pending_queue = layer_pair.pending->CreateEvictionQueue(tree_priority); 134 layer_pair.active->picture_layer_tiling_set(), tree_priority,
135 skip_shared_out_of_order_tiles));
136 }
137 if (layer_pair.pending) {
138 pending_queue = make_scoped_ptr(new TilingSetEvictionQueue(
139 layer_pair.pending->picture_layer_tiling_set(), tree_priority,
140 skip_shared_out_of_order_tiles));
141 }
135 } 142 }
136 143
137 EvictionTilePriorityQueue::PairedTilingSetQueue::~PairedTilingSetQueue() { 144 EvictionTilePriorityQueue::PairedTilingSetQueue::~PairedTilingSetQueue() {
138 } 145 }
139 146
140 bool EvictionTilePriorityQueue::PairedTilingSetQueue::IsEmpty() const { 147 bool EvictionTilePriorityQueue::PairedTilingSetQueue::IsEmpty() const {
141 return (!active_queue || active_queue->IsEmpty()) && 148 return (!active_queue || active_queue->IsEmpty()) &&
142 (!pending_queue || pending_queue->IsEmpty()); 149 (!pending_queue || pending_queue->IsEmpty());
143 } 150 }
144 151
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return active_tile->required_for_activation() ? PENDING_TREE : ACTIVE_TREE; 209 return active_tile->required_for_activation() ? PENDING_TREE : ACTIVE_TREE;
203 } 210 }
204 211
205 // Return tile with a lower priority. 212 // Return tile with a lower priority.
206 if (pending_priority.IsHigherPriorityThan(active_priority)) 213 if (pending_priority.IsHigherPriorityThan(active_priority))
207 return ACTIVE_TREE; 214 return ACTIVE_TREE;
208 return PENDING_TREE; 215 return PENDING_TREE;
209 } 216 }
210 217
211 } // namespace cc 218 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698