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

Unified Diff: cc/resources/raster_tile_priority_queue.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
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/raster_tile_priority_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/raster_tile_priority_queue.h
diff --git a/cc/resources/raster_tile_priority_queue.h b/cc/resources/raster_tile_priority_queue.h
index 416a57a670a006e03daeaf7977d8d827b454f724..65c924798a8338de2e6002254a2c481f8fc742ca 100644
--- a/cc/resources/raster_tile_priority_queue.h
+++ b/cc/resources/raster_tile_priority_queue.h
@@ -16,12 +16,20 @@
namespace cc {
+// TODO(vmpstr): Consider virtualizing this and adding ::Create with the
+// parameters of ::Build that would create a simpler queue for required only
+// tiles (ie, there's no need for the heap if all we're interested in are the
+// required tiles.
class CC_EXPORT RasterTilePriorityQueue {
public:
- struct PairedTilingSetQueue {
+ enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW };
+
+ class PairedTilingSetQueue {
+ public:
PairedTilingSetQueue();
PairedTilingSetQueue(const PictureLayerImpl::Pair& layer_pair,
- TreePriority tree_priority);
+ TreePriority tree_priority,
+ Type type);
~PairedTilingSetQueue();
bool IsEmpty() const;
@@ -33,19 +41,28 @@ class CC_EXPORT RasterTilePriorityQueue {
scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const;
- scoped_ptr<TilingSetRasterQueue> active_queue;
- scoped_ptr<TilingSetRasterQueue> pending_queue;
- bool has_both_layers;
+ const TilingSetRasterQueue* active_queue() const {
+ return active_queue_.get();
+ }
+ const TilingSetRasterQueue* pending_queue() const {
+ return pending_queue_.get();
+ }
+
+ private:
+ scoped_ptr<TilingSetRasterQueue> active_queue_;
+ scoped_ptr<TilingSetRasterQueue> pending_queue_;
+ bool has_both_layers_;
// Set of returned tiles (excluding the current one) for DCHECKing.
- std::set<const Tile*> returned_tiles_for_debug;
+ std::set<const Tile*> returned_tiles_for_debug_;
};
RasterTilePriorityQueue();
~RasterTilePriorityQueue();
void Build(const std::vector<PictureLayerImpl::Pair>& paired_layers,
- TreePriority tree_priority);
+ TreePriority tree_priority,
+ Type type);
void Reset();
bool IsEmpty() const;
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/raster_tile_priority_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698