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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "cc/tiles/tiling_set_eviction_queue.h" | 9 #include "cc/tiles/tiling_set_eviction_queue.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 TilingSetEvictionQueue::TilingSetEvictionQueue( | 13 TilingSetEvictionQueue::TilingSetEvictionQueue( |
14 PictureLayerTilingSet* tiling_set) | 14 PictureLayerTilingSet* tiling_set, |
15 : tree_(tiling_set->tree()), phase_(EVENTUALLY_RECT) { | 15 bool is_drawing_layer) |
| 16 : tree_(tiling_set->tree()), |
| 17 phase_(EVENTUALLY_RECT), |
| 18 is_drawing_layer_(is_drawing_layer) { |
16 // Early out if the layer has no tilings. | 19 // Early out if the layer has no tilings. |
17 if (!tiling_set->num_tilings()) | 20 if (!tiling_set->num_tilings()) |
18 return; | 21 return; |
19 GenerateTilingOrder(tiling_set); | 22 GenerateTilingOrder(tiling_set); |
20 eventually_iterator_ = EventuallyTilingIterator(&tilings_, tree_); | 23 eventually_iterator_ = EventuallyTilingIterator(&tilings_, tree_); |
21 if (eventually_iterator_.done()) { | 24 if (eventually_iterator_.done()) { |
22 AdvancePhase(); | 25 AdvancePhase(); |
23 return; | 26 return; |
24 } | 27 } |
25 current_tile_ = *eventually_iterator_; | 28 current_tile_ = *eventually_iterator_; |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 522 |
520 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags( | 523 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags( |
521 const PrioritizedTile& tile) const { | 524 const PrioritizedTile& tile) const { |
522 bool activation_flag_matches = tile.tile()->required_for_activation() == | 525 bool activation_flag_matches = tile.tile()->required_for_activation() == |
523 return_required_for_activation_tiles_; | 526 return_required_for_activation_tiles_; |
524 bool occluded_flag_matches = tile.is_occluded() == return_occluded_tiles_; | 527 bool occluded_flag_matches = tile.is_occluded() == return_occluded_tiles_; |
525 return activation_flag_matches && occluded_flag_matches; | 528 return activation_flag_matches && occluded_flag_matches; |
526 } | 529 } |
527 | 530 |
528 } // namespace cc | 531 } // namespace cc |
OLD | NEW |