| OLD | NEW |
| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "cc/resources/tiling_set_eviction_queue.h" | 7 #include "cc/resources/tiling_set_eviction_queue.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 TilingIteratorType* iterator) { | 240 TilingIteratorType* iterator) { |
| 241 PictureLayerTiling* tiling = (*tilings_)[tiling_index_]; | 241 PictureLayerTiling* tiling = (*tilings_)[tiling_index_]; |
| 242 tile_ = tiling->TileAt(iterator->index_x(), iterator->index_y()); | 242 tile_ = tiling->TileAt(iterator->index_x(), iterator->index_y()); |
| 243 // If there's nothing to evict, return false. | 243 // If there's nothing to evict, return false. |
| 244 if (!tile_ || !tile_->HasResource()) | 244 if (!tile_ || !tile_->HasResource()) |
| 245 return false; | 245 return false; |
| 246 if (skip_pending_visible_rect_ && | 246 if (skip_pending_visible_rect_ && |
| 247 tiling->pending_visible_rect().Intersects(tile_->content_rect())) { | 247 tiling->pending_visible_rect().Intersects(tile_->content_rect())) { |
| 248 return false; | 248 return false; |
| 249 } | 249 } |
| 250 (*tilings_)[tiling_index_]->UpdateTileAndTwinPriority(tile_); | 250 (*tilings_)[tiling_index_]->UpdateTilePriority(tile_); |
| 251 // In other cases, the tile we got is a viable candidate, return true. | 251 // In other cases, the tile we got is a viable candidate, return true. |
| 252 return true; | 252 return true; |
| 253 } | 253 } |
| 254 | 254 |
| 255 // EventuallyTilingIterator | 255 // EventuallyTilingIterator |
| 256 TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator( | 256 TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator( |
| 257 std::vector<PictureLayerTiling*>* tilings, | 257 std::vector<PictureLayerTiling*>* tilings, |
| 258 WhichTree tree, | 258 WhichTree tree, |
| 259 bool skip_shared_out_of_order_tiles) | 259 bool skip_shared_out_of_order_tiles) |
| 260 : EvictionRectIterator(tilings, | 260 : EvictionRectIterator(tilings, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 549 |
| 550 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags( | 550 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags( |
| 551 const Tile* tile) const { | 551 const Tile* tile) const { |
| 552 bool activation_flag_matches = | 552 bool activation_flag_matches = |
| 553 tile->required_for_activation() == return_required_for_activation_tiles_; | 553 tile->required_for_activation() == return_required_for_activation_tiles_; |
| 554 bool occluded_flag_matches = tile->is_occluded() == return_occluded_tiles_; | 554 bool occluded_flag_matches = tile->is_occluded() == return_occluded_tiles_; |
| 555 return activation_flag_matches && occluded_flag_matches; | 555 return activation_flag_matches && occluded_flag_matches; |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace cc | 558 } // namespace cc |
| OLD | NEW |