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

Unified Diff: cc/resources/tile_manager.h

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 03fb6e132eaea03a15b18c271756c73de9138b81..d6729e810d4d28b2df91b4f93970815d5eaaa39e 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -47,6 +47,9 @@ class CC_EXPORT TileManagerClient {
// Called when all tiles marked as required for activation are ready to draw.
virtual void NotifyReadyToActivate() = 0;
+ // Called when all tiles required to draw are ready.
+ virtual void NotifyReadyToDraw() = 0;
+
// Called when the visible representation of a tile might have changed. Some
// examples are:
// - Tile version initialized.
@@ -87,8 +90,9 @@ class CC_EXPORT TileManager : public RasterizerClient,
public RefCountedManager<Tile> {
public:
enum NamedTaskSet {
- REQUIRED_FOR_ACTIVATION = 0,
- ALL = 1,
+ REQUIRED_FOR_DRAW = 0,
+ REQUIRED_FOR_ACTIVATION = 1,
+ ALL = 2
// Adding additional values requires increasing kNumberOfTaskSets in
// rasterizer.h
};
@@ -229,7 +233,9 @@ class CC_EXPORT TileManager : public RasterizerClient,
MemoryUsage* usage);
bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority);
bool IsReadyToActivate() const;
+ bool IsReadyToDraw() const;
void CheckIfReadyToActivate();
+ void CheckIfReadyToDraw();
TileManagerClient* client_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
@@ -269,6 +275,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_;
UniqueNotifier ready_to_activate_check_notifier_;
+ UniqueNotifier ready_to_draw_check_notifier_;
RasterTilePriorityQueue raster_priority_queue_;
EvictionTilePriorityQueue eviction_priority_queue_;

Powered by Google App Engine
This is Rietveld 408576698