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

Unified Diff: cc/resources/tiling_set_raster_queue_required.h

Issue 816453008: cc: Split tiling set raster queues into all and required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months 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
Index: cc/resources/tiling_set_raster_queue_required.h
diff --git a/cc/resources/tiling_set_raster_queue_required.h b/cc/resources/tiling_set_raster_queue_required.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d55ba5e662a1e03e25bdcfeaf4d3bab9597d84c
--- /dev/null
+++ b/cc/resources/tiling_set_raster_queue_required.h
@@ -0,0 +1,38 @@
+// 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_REQUIRED_H_
+#define CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/resources/picture_layer_tiling_set.h"
+#include "cc/resources/raster_tile_priority_queue.h"
+#include "cc/resources/tiling_set_raster_queue.h"
+
+namespace cc {
+
+// This queue only returns tiles that are required for either activation or
+// draw, as specified by RasterTilePriorityQueue::Type passed in the
+// constructor.
+class CC_EXPORT TilingSetRasterQueueRequired : public TilingSetRasterQueue {
+ public:
+ TilingSetRasterQueueRequired(PictureLayerTilingSet* tiling_set,
+ RasterTilePriorityQueue::Type type);
+ ~TilingSetRasterQueueRequired() override;
+
+ Tile* Top() override;
+ const Tile* Top() const override;
+ void Pop() override;
+ bool IsEmpty() const override;
+
+ private:
+ bool IsTileRequired(const Tile* tile) const;
+
+ PictureLayerTiling::TilingRasterTileIterator iterator_;
+ RasterTilePriorityQueue::Type type_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_

Powered by Google App Engine
This is Rietveld 408576698