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

Unified Diff: cc/resources/tile_manager.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/resource_provider.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 f945f7c0088617a1f0a46cc74df457cbd2d15707..37ab765b84a8d904c7a2f89ce8dce50f9d02658d 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -39,11 +39,6 @@ class ResourceProvider;
class CC_EXPORT TileManagerClient {
public:
- // Returns the set of layers that the tile manager should consider for raster.
- // TODO(vmpstr): Change the way we determine if we are ready to activate, so
- // that this can be removed.
- virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() const = 0;
-
// Called when all tiles marked as required for activation are ready to draw.
virtual void NotifyReadyToActivate() = 0;
@@ -70,6 +65,11 @@ class CC_EXPORT TileManagerClient {
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;
+
protected:
virtual ~TileManagerClient() {}
};
@@ -176,6 +176,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
scheduled_raster_task_limit_ = limit;
}
+ bool IsReadyToActivate() const;
+ bool IsReadyToDraw() const;
+
protected:
TileManager(TileManagerClient* client,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
@@ -259,8 +262,7 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
const TilePriority& oother_priority,
MemoryUsage* usage);
bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority);
- bool IsReadyToActivate() const;
- bool IsReadyToDraw() const;
+ bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const;
void NotifyReadyToActivate();
void NotifyReadyToDraw();
void CheckIfReadyToActivate();
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698