Chromium Code Reviews| Index: cc/resources/tiling_set_eviction_queue.h |
| diff --git a/cc/resources/tiling_set_eviction_queue.h b/cc/resources/tiling_set_eviction_queue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4928cd8838fb0dd9de56a657cd14f9b85cbcf01c |
| --- /dev/null |
| +++ b/cc/resources/tiling_set_eviction_queue.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ |
| +#define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ |
| + |
| +#include "cc/base/cc_export.h" |
| +#include "cc/resources/picture_layer_tiling_set.h" |
| + |
| +namespace cc { |
| + |
| +class CC_EXPORT TilingSetEvictionQueue { |
| + public: |
| + TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set, |
| + TreePriority tree_priority); |
| + ~TilingSetEvictionQueue(); |
| + |
| + Tile* Top(); |
| + const Tile* Top() const; |
| + void Pop(); |
| + bool IsEmpty() const; |
| + |
| + private: |
| + bool AdvanceToNextCategory(); |
| + bool AdvanceToNextTilingRangeType(); |
| + bool AdvanceToNextValidTiling(); |
| + |
| + PictureLayerTilingSet::TilingRange CurrentTilingRange() const; |
| + size_t CurrentTilingIndex() const; |
| + |
| + Tile* PopEvictionTile(); |
| + |
| + PictureLayerTilingSet* tiling_set_; |
| + TreePriority tree_priority_; |
| + |
| + PictureLayerTiling::EvictionCategory current_category_; |
| + size_t current_tiling_index_; |
| + PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; |
| + |
| + 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.
|
| + size_t current_eviction_tiles_index_; |
| + Tile* current_tile_; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ |