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

Unified Diff: cc/resources/tile_manager.h

Issue 1035043002: cc: Fix memory limit edge cases for SetIsLikelyToRequireADraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 9 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 | « no previous file | 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..cd08e3081485cfc4e2e5a181b702319a9c17b88b 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -128,6 +128,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
int source_frame_number,
int flags);
+ bool IsReadyToActivate() const;
+ bool IsReadyToDraw() const;
+
scoped_refptr<base::trace_event::ConvertableToTraceFormat> BasicStateAsValue()
const;
void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const;
@@ -135,6 +138,7 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
return memory_stats_from_last_assign_;
}
+ // Public methods for testing.
void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) {
for (size_t i = 0; i < tiles.size(); ++i) {
TileDrawInfo& draw_info = tiles[i]->draw_info();
@@ -176,8 +180,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
scheduled_raster_task_limit_ = limit;
}
- bool IsReadyToActivate() const;
- bool IsReadyToDraw() const;
+ void CheckIfMoreTilesNeedToBePreparedForTesting() {
+ CheckIfMoreTilesNeedToBePrepared();
+ }
protected:
TileManager(TileManagerClient* client,
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698