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

Unified Diff: cc/resources/tile_manager.h

Issue 17351017: Re-land: cc: Add raster finished signals to RasterWorkerPool. (Closed) Base URL: http://git.chromium.org/chromium/src.git@new-graph-build
Patch Set: vmpstr's review Created 7 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/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index ef8ccfb2f21142bbbf18a1ba91db822195f2ce27..5d842707b547037770934da5827e96eb09ec5a2e 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -90,7 +90,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient {
}
bool AreTilesRequiredForActivationReady() const {
- return tiles_that_need_to_be_initialized_for_activation_.empty();
+ return tiles_that_need_to_be_initialized_for_activation_.empty() &&
+ oom_tiles_that_need_to_be_initialized_for_activation_.empty();
}
protected:
@@ -110,10 +111,18 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient {
// Overriden from RasterWorkerPoolClient:
virtual bool ShouldForceTasksRequiredForActivationToComplete() const
OVERRIDE;
+ virtual void DidFinishedRunningTasks() OVERRIDE;
+ virtual void DidFinishedRunningTasksRequiredForActivation() OVERRIDE;
// Virtual for test
virtual void ScheduleTasks();
+ const std::vector<Tile*>& tiles_that_need_to_be_rasterized() const {
+ return tiles_that_need_to_be_rasterized_;
+ }
+
+ void ReassignGpuMemoryToOOMTilesRequiredForActivation();
+
private:
void OnImageDecodeTaskCompleted(
int layer_id,
@@ -155,6 +164,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient {
TileVector tiles_that_need_to_be_rasterized_;
typedef std::set<Tile*> TileSet;
TileSet tiles_that_need_to_be_initialized_for_activation_;
+ TileSet oom_tiles_that_need_to_be_initialized_for_activation_;
bool ever_exceeded_memory_budget_;
MemoryHistory::Entry memory_stats_from_last_assign_;

Powered by Google App Engine
This is Rietveld 408576698