Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ | |
| 6 #define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ | |
| 7 | |
| 8 #include "cc/base/cc_export.h" | |
| 9 #include "cc/resources/picture_layer_tiling_set.h" | |
| 10 | |
| 11 namespace cc { | |
| 12 | |
| 13 class CC_EXPORT TilingSetEvictionQueue { | |
| 14 public: | |
| 15 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set, | |
| 16 TreePriority tree_priority); | |
| 17 ~TilingSetEvictionQueue(); | |
| 18 | |
| 19 Tile* Top(); | |
| 20 const Tile* Top() const; | |
| 21 void Pop(); | |
| 22 bool IsEmpty() const; | |
| 23 | |
| 24 private: | |
| 25 bool AdvanceToNextCategory(); | |
| 26 bool AdvanceToNextTilingRangeType(); | |
| 27 bool AdvanceToNextValidTiling(); | |
| 28 | |
| 29 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; | |
| 30 size_t CurrentTilingIndex() const; | |
| 31 | |
| 32 Tile* PopEvictionTile(); | |
| 33 | |
| 34 PictureLayerTilingSet* tiling_set_; | |
| 35 TreePriority tree_priority_; | |
| 36 | |
| 37 PictureLayerTiling::EvictionCategory current_category_; | |
| 38 size_t current_tiling_index_; | |
| 39 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; | |
| 40 | |
| 41 const std::vector<Tile*>* current_eviction_tiles_; | |
|
vmpstr
2014/11/25 17:37:05
Is it worth to make a struct here something like
USE eero AT chromium.org
2014/11/26 14:20:46
I took this route.
| |
| 42 size_t current_eviction_tiles_index_; | |
| 43 Tile* current_tile_; | |
| 44 }; | |
| 45 | |
| 46 } // namespace cc | |
| 47 | |
| 48 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ | |
| OLD | NEW |