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

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

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: rebase Created 3 years, 8 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/tiling_set_raster_queue_all.h ('k') | no next file » | 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/tiles/tiling_set_raster_queue_all.h" 5 #include "cc/tiles/tiling_set_raster_queue_all.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (!IsTileValid(tile)) { 193 if (!IsTileValid(tile)) {
194 current_tile_ = PrioritizedTile(); 194 current_tile_ = PrioritizedTile();
195 return false; 195 return false;
196 } 196 }
197 current_tile_ = tiling_->MakePrioritizedTile(tile, priority_rect_type_); 197 current_tile_ = tiling_->MakePrioritizedTile(tile, priority_rect_type_);
198 return true; 198 return true;
199 } 199 }
200 200
201 bool TilingSetRasterQueueAll::OnePriorityRectIterator::IsTileValid( 201 bool TilingSetRasterQueueAll::OnePriorityRectIterator::IsTileValid(
202 const Tile* tile) const { 202 const Tile* tile) const {
203 if (!tile || !TileNeedsRaster(tile)) 203 if (!tile)
204 return false; 204 return false;
205
206 // A tile is valid for raster if it needs raster and is unoccluded.
207 bool tile_is_valid_for_raster =
208 tile->draw_info().NeedsRaster() && !tiling_->IsTileOccluded(tile);
209
210 // A tile is not valid for the raster queue if it is not valid for raster or
211 // processing for checker-images.
212 if (!tile_is_valid_for_raster) {
213 bool tile_is_valid_for_checker_images =
214 tile->draw_info().is_checker_imaged() &&
215 tiling_->ShouldDecodeCheckeredImagesForTile(tile);
216 if (!tile_is_valid_for_checker_images)
217 return false;
218 }
219
205 // After the pending visible rect has been processed, we must return false 220 // After the pending visible rect has been processed, we must return false
206 // for pending visible rect tiles as tiling iterators do not ignore those 221 // for pending visible rect tiles as tiling iterators do not ignore those
207 // tiles. 222 // tiles.
208 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) { 223 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) {
209 gfx::Rect tile_bounds = tiling_data_->TileBounds(tile->tiling_i_index(), 224 gfx::Rect tile_bounds = tiling_data_->TileBounds(tile->tiling_i_index(),
210 tile->tiling_j_index()); 225 tile->tiling_j_index());
211 if (pending_visible_rect_.Intersects(tile_bounds)) 226 if (pending_visible_rect_.Intersects(tile_bounds))
212 return false; 227 return false;
213 } 228 }
214 return true; 229 return true;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 current_tile_ = PrioritizedTile(); 453 current_tile_ = PrioritizedTile();
439 return *this; 454 return *this;
440 } 455 }
441 current_tile_ = *eventually_iterator_; 456 current_tile_ = *eventually_iterator_;
442 break; 457 break;
443 } 458 }
444 return *this; 459 return *this;
445 } 460 }
446 461
447 } // namespace cc 462 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tiling_set_raster_queue_all.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698