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

Unified Diff: cc/resources/tile_manager.h

Issue 900073003: cc: Rework how picture layer tiling set gets into raster queues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 10 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/raster_tile_priority_queue_required.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 2bdc9e1a29e377ea43360e3dd0bee96c686ecd36..a2c15621463901b01ba934fc08ce68ecc94fe9c6 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -52,24 +52,14 @@ class CC_EXPORT TileManagerClient {
// - Tile marked for on-demand raster.
virtual void NotifyTileStateChanged(const Tile* tile) = 0;
- // Given an empty raster tile priority queue, this will build a priority queue
- // that will return tiles in order in which they should be rasterized.
- // Note if the queue was previous built, Reset must be called on it.
- virtual scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
- TreePriority tree_priority,
- RasterTilePriorityQueue::Type type) = 0;
-
- // Given an empty eviction tile priority queue, this will build a priority
- // queue that will return tiles in order in which they should be evicted.
- // Note if the queue was previous built, Reset must be called on it.
- virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
- TreePriority tree_priority) = 0;
-
// Informs the client that due to the currently rasterizing (or scheduled to
// be rasterized) tiles, we will be in a position that will likely require a
// draw. This can be used to preemptively start a frame.
virtual void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) = 0;
+ // Returns true iff we have a pending tree.
+ virtual bool PendingTreeExists() = 0;
+
protected:
virtual ~TileManagerClient() {}
};
@@ -111,6 +101,11 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
size_t scheduled_raster_task_limit);
~TileManager() override;
+ void RegisterPictureLayerTilingSet(int layer_id,
+ WhichTree tree,
+ PictureLayerTilingSet* tiling_set);
+ void UnregisterPictureLayerTilingSet(int layer_id, WhichTree tree);
+
// Assigns tile memory and schedules work to prepare tiles for drawing.
// - Runs client_->NotifyReadyToActivate() when all tiles required for
// activation are prepared, or failed to prepare due to OOM.
@@ -179,6 +174,10 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
bool IsReadyToActivate() const;
bool IsReadyToDraw() const;
+ scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
+ RasterTilePriorityQueue::Type type) const;
+ scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue() const;
+
protected:
TileManager(TileManagerClient* client,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
@@ -312,6 +311,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
bool did_notify_ready_to_activate_;
bool did_notify_ready_to_draw_;
+ base::hash_map<int, PictureLayerTilingSet::Pair>
+ paired_picture_layer_tiling_sets_;
+
DISALLOW_COPY_AND_ASSIGN(TileManager);
};
« no previous file with comments | « cc/resources/raster_tile_priority_queue_required.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698