| 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 #ifndef CC_TILES_TILING_SET_EVICTION_QUEUE_H_ | 5 #ifndef CC_TILES_TILING_SET_EVICTION_QUEUE_H_ |
| 6 #define CC_TILES_TILING_SET_EVICTION_QUEUE_H_ | 6 #define CC_TILES_TILING_SET_EVICTION_QUEUE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // | 60 // |
| 61 // Additional notes: | 61 // Additional notes: |
| 62 // Since eventually the tiles are considered to have the priority which is the | 62 // Since eventually the tiles are considered to have the priority which is the |
| 63 // higher of the two trees, we might visit a tile that should actually be | 63 // higher of the two trees, we might visit a tile that should actually be |
| 64 // returned by its twin. In those situations, the tiles are not returned. That | 64 // returned by its twin. In those situations, the tiles are not returned. That |
| 65 // is, since the twin has higher priority, it should return it when it gets to | 65 // is, since the twin has higher priority, it should return it when it gets to |
| 66 // it. This ensures that we don't block raster because we've returned a tile | 66 // it. This ensures that we don't block raster because we've returned a tile |
| 67 // with low priority on one tree, but high combined priority. | 67 // with low priority on one tree, but high combined priority. |
| 68 class CC_EXPORT TilingSetEvictionQueue { | 68 class CC_EXPORT TilingSetEvictionQueue { |
| 69 public: | 69 public: |
| 70 explicit TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set); | 70 explicit TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set, |
| 71 bool is_drawing_layer); |
| 71 ~TilingSetEvictionQueue(); | 72 ~TilingSetEvictionQueue(); |
| 72 | 73 |
| 73 const PrioritizedTile& Top() const; | 74 const PrioritizedTile& Top() const; |
| 74 void Pop(); | 75 void Pop(); |
| 75 bool IsEmpty() const; | 76 bool IsEmpty() const; |
| 77 bool is_drawing_layer() const { return is_drawing_layer_; } |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 enum Phase { | 80 enum Phase { |
| 79 EVENTUALLY_RECT, | 81 EVENTUALLY_RECT, |
| 80 SOON_BORDER_RECT, | 82 SOON_BORDER_RECT, |
| 81 SKEWPORT_RECT, | 83 SKEWPORT_RECT, |
| 82 PENDING_VISIBLE_RECT, | 84 PENDING_VISIBLE_RECT, |
| 83 PENDING_VISIBLE_RECT_REQUIRED_FOR_ACTIVATION, | 85 PENDING_VISIBLE_RECT_REQUIRED_FOR_ACTIVATION, |
| 84 VISIBLE_RECT_OCCLUDED, | 86 VISIBLE_RECT_OCCLUDED, |
| 85 VISIBLE_RECT_UNOCCLUDED, | 87 VISIBLE_RECT_UNOCCLUDED, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 WhichTree tree_; | 193 WhichTree tree_; |
| 192 Phase phase_; | 194 Phase phase_; |
| 193 PrioritizedTile current_tile_; | 195 PrioritizedTile current_tile_; |
| 194 std::vector<PictureLayerTiling*> tilings_; | 196 std::vector<PictureLayerTiling*> tilings_; |
| 195 | 197 |
| 196 EventuallyTilingIterator eventually_iterator_; | 198 EventuallyTilingIterator eventually_iterator_; |
| 197 SoonBorderTilingIterator soon_iterator_; | 199 SoonBorderTilingIterator soon_iterator_; |
| 198 SkewportTilingIterator skewport_iterator_; | 200 SkewportTilingIterator skewport_iterator_; |
| 199 PendingVisibleTilingIterator pending_visible_iterator_; | 201 PendingVisibleTilingIterator pending_visible_iterator_; |
| 200 VisibleTilingIterator visible_iterator_; | 202 VisibleTilingIterator visible_iterator_; |
| 203 bool is_drawing_layer_; |
| 201 }; | 204 }; |
| 202 | 205 |
| 203 } // namespace cc | 206 } // namespace cc |
| 204 | 207 |
| 205 #endif // CC_TILES_TILING_SET_EVICTION_QUEUE_H_ | 208 #endif // CC_TILES_TILING_SET_EVICTION_QUEUE_H_ |
| OLD | NEW |