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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f88ce3bd710b0c9c88d1426261741f807c15146d
--- /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();
+ TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
+ TreePriority tree_priority);
+ ~TilingSetEvictionQueue();
+
+ Tile* Top();
+ const Tile* Top() const;
+ void Pop();
+ bool IsEmpty() const;
+
+ private:
+ bool AdvanceToNextCategory();
+ bool AdvanceToNextEvictionTile();
+ bool AdvanceToNextTilingRangeType();
+ bool AdvanceToNextValidTiling();
+
+ PictureLayerTilingSet::TilingRange CurrentTilingRange() const;
+ size_t CurrentTilingIndex() const;
+
+ PictureLayerTilingSet* tiling_set_;
+ TreePriority tree_priority_;
+
+ PictureLayerTiling::EvictionCategory current_category_;
+ size_t current_tiling_index_;
+ PictureLayerTilingSet::TilingRangeType current_tiling_range_type_;
+ Tile* current_eviction_tile_;
+
+ const std::vector<Tile*>* eviction_tiles_;
+ size_t next_eviction_tile_index_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_
« 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