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

Unified Diff: cc/tiles/tile_manager.h

Issue 1210073020: Reland (2): cc: Make tile manager object persist for the length of LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/tiles/tile_manager.h
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index 56ec94b58b3114e6460ee94b32ffe331a4192535..332699fad39587d43fc239b9c76c5adbf607e611 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -106,8 +106,6 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient {
static scoped_ptr<TileManager> Create(TileManagerClient* client,
base::SequencedTaskRunner* task_runner,
- ResourcePool* resource_pool,
- TileTaskRunner* tile_task_runner,
size_t scheduled_raster_task_limit);
~TileManager() override;
@@ -116,7 +114,16 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient {
// activation are prepared, or failed to prepare due to OOM.
// - Runs client_->NotifyReadyToDraw() when all tiles required draw are
// prepared, or failed to prepare due to OOM.
- void PrepareTiles(const GlobalStateThatImpactsTilePriority& state);
+ bool PrepareTiles(const GlobalStateThatImpactsTilePriority& state);
+
+ // Synchronously finish any in progress work, cancel the rest, and clean up as
+ // much resources as possible. Also, prevents any future work until a
+ // SetResources call.
+ void FinishTasksAndCleanUp();
+
+ // Set the new given resource pool and tile task runner.
enne (OOO) 2015/07/06 18:07:25 Should you leave a comment here that you need to c
vmpstr 2015/07/06 18:41:35 In order to ensure that the caller is aware that F
+ void SetResources(ResourcePool* resource_pool,
+ TileTaskRunner* tile_task_runner);
// This causes any completed raster work to finalize, so that tiles get up to
// date draw information.
@@ -196,8 +203,6 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient {
protected:
TileManager(TileManagerClient* client,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
- ResourcePool* resource_pool,
- TileTaskRunner* tile_task_runner,
size_t scheduled_raster_task_limit);
void FreeResourcesForReleasedTiles();
« no previous file with comments | « cc/test/fake_tile_manager.cc ('k') | cc/tiles/tile_manager.cc » ('j') | cc/tiles/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698