Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: cc/resources/tiling_set_eviction_queue.h

Issue 741683003: cc: Move LayerEvictionTileIterator to a separate file and make it a queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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();
16 TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
17 TreePriority tree_priority);
18 ~TilingSetEvictionQueue();
19
20 Tile* Top();
21 const Tile* Top() const;
22 void Pop();
23 bool IsEmpty() const;
24
25 private:
26 bool AdvanceToNextCategory();
27 bool AdvanceToNextEvictionTile();
28 bool AdvanceToNextTilingRangeType();
29 bool AdvanceToNextValidTiling();
30
31 PictureLayerTilingSet::TilingRange CurrentTilingRange() const;
32 size_t CurrentTilingIndex() const;
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 Tile* current_eviction_tile_;
41
42 const std::vector<Tile*>* eviction_tiles_;
43 size_t next_eviction_tile_index_;
44 };
45
46 } // namespace cc
47
48 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_unittest.cc ('k') | cc/resources/tiling_set_eviction_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698