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

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

Issue 638353002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr in src/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formating. 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 next_tree == ACTIVE_TREE ? &active_iterator : &pending_iterator; 194 next_tree == ACTIVE_TREE ? &active_iterator : &pending_iterator;
195 195
196 // Accept all non-shared tiles. 196 // Accept all non-shared tiles.
197 const Tile* tile = **next_iterator; 197 const Tile* tile = **next_iterator;
198 if (!tile->is_shared()) 198 if (!tile->is_shared())
199 break; 199 break;
200 200
201 // Accept a shared tile if the next tree is the higher priority one 201 // Accept a shared tile if the next tree is the higher priority one
202 // corresponding the iterator (active or pending) which usually (but due 202 // corresponding the iterator (active or pending) which usually (but due
203 // to spiral iterators not always) returns the shared tile first. 203 // to spiral iterators not always) returns the shared tile first.
204 if (next_tree == HigherPriorityTree(tree_priority, NULL, NULL, tile)) 204 if (next_tree == HigherPriorityTree(tree_priority, NULL, nullptr, tile))
205 break; 205 break;
206 } 206 }
207 } 207 }
208 208
209 // If no empty, use Top to do DCHECK the next iterator. 209 // If no empty, use Top to do DCHECK the next iterator.
210 DCHECK(IsEmpty() || Top(tree_priority)); 210 DCHECK(IsEmpty() || Top(tree_priority));
211 } 211 }
212 212
213 WhichTree 213 WhichTree
214 RasterTilePriorityQueue::PairedPictureLayerQueue::NextTileIteratorTree( 214 RasterTilePriorityQueue::PairedPictureLayerQueue::NextTileIteratorTree(
215 TreePriority tree_priority) const { 215 TreePriority tree_priority) const {
216 DCHECK(!IsEmpty()); 216 DCHECK(!IsEmpty());
217 217
218 // If we only have one iterator with tiles, return it. 218 // If we only have one iterator with tiles, return it.
219 if (!active_iterator) 219 if (!active_iterator)
220 return PENDING_TREE; 220 return PENDING_TREE;
221 if (!pending_iterator) 221 if (!pending_iterator)
222 return ACTIVE_TREE; 222 return ACTIVE_TREE;
223 223
224 // Now both iterators have tiles, so we have to decide based on tree priority. 224 // Now both iterators have tiles, so we have to decide based on tree priority.
225 return HigherPriorityTree( 225 return HigherPriorityTree(
226 tree_priority, &active_iterator, &pending_iterator, NULL); 226 tree_priority, &active_iterator, &pending_iterator, nullptr);
227 } 227 }
228 228
229 } // namespace cc 229 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698