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

Unified Diff: cc/resources/tiling_set_raster_queue.h

Issue 742343002: cc: Move LayerRasterTileIterator 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/raster_tile_priority_queue.cc ('k') | cc/resources/tiling_set_raster_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tiling_set_raster_queue.h
diff --git a/cc/resources/tiling_set_raster_queue.h b/cc/resources/tiling_set_raster_queue.h
new file mode 100644
index 0000000000000000000000000000000000000000..58faa8a78c90fc17fe83f11b39a38695f5b1e869
--- /dev/null
+++ b/cc/resources/tiling_set_raster_queue.h
@@ -0,0 +1,46 @@
+// 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_RASTER_QUEUE_H_
+#define CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/resources/picture_layer_tiling_set.h"
+
+namespace cc {
+
+class CC_EXPORT TilingSetRasterQueue {
+ public:
+ TilingSetRasterQueue();
+ TilingSetRasterQueue(PictureLayerTilingSet* tiling_set,
+ bool prioritize_low_res);
+ ~TilingSetRasterQueue();
+
+ Tile* Top();
+ const Tile* Top() const;
+ void Pop();
+ bool IsEmpty() const;
+
+ private:
+ enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS };
+
+ void AdvanceToNextStage();
+
+ PictureLayerTilingSet* tiling_set_;
+
+ struct IterationStage {
+ IteratorType iterator_type;
+ TilePriority::PriorityBin tile_type;
+ };
+
+ size_t current_stage_;
+
+ // One low res stage, and three high res stages.
+ IterationStage stages_[4];
+ PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS];
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_
« no previous file with comments | « cc/resources/raster_tile_priority_queue.cc ('k') | cc/resources/tiling_set_raster_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698