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

Unified Diff: cc/tiles/tile_manager.h

Issue 2555743004: Delay activation/draw on GPU tile work completion (Closed)
Patch Set: cleanup Created 4 years 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 853a43850edc55d86172709322904a111396bba1..a1fa4744779ca7a5938f879b1642ce00f322e3ff 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -292,6 +292,7 @@ class CC_EXPORT TileManager {
void DidFinishRunningTileTasksRequiredForActivation();
void DidFinishRunningTileTasksRequiredForDraw();
void DidFinishRunningAllTileTasks();
+ void RequiredForActivationTilesAreReadyToDraw(uint64_t callback_id);
scoped_refptr<TileTask> CreateTaskSetFinishedTask(
void (TileManager::*callback)());
@@ -303,23 +304,23 @@ class CC_EXPORT TileManager {
bool UsePartialRaster() const;
- TileManagerClient* client_;
- base::SequencedTaskRunner* task_runner_;
- ResourcePool* resource_pool_;
+ TileManagerClient* client_ = nullptr;
+ base::SequencedTaskRunner* task_runner_ = nullptr;
+ ResourcePool* resource_pool_ = nullptr;
std::unique_ptr<TileTaskManager> tile_task_manager_;
- RasterBufferProvider* raster_buffer_provider_;
+ RasterBufferProvider* raster_buffer_provider_ = nullptr;
GlobalStateThatImpactsTilePriority global_state_;
- size_t scheduled_raster_task_limit_;
- const bool use_partial_raster_;
- bool use_gpu_rasterization_;
+ size_t scheduled_raster_task_limit_ = 0;
+ const bool use_partial_raster_ = false;
+ bool use_gpu_rasterization_ = false;
std::unordered_map<Tile::Id, Tile*> tiles_;
- bool all_tiles_that_need_to_be_rasterized_are_scheduled_;
+ bool all_tiles_that_need_to_be_rasterized_are_scheduled_ = true;
MemoryHistory::Entry memory_stats_from_last_assign_;
- bool did_check_for_completed_tasks_since_last_schedule_tasks_;
- bool did_oom_on_last_assign_;
+ bool did_check_for_completed_tasks_since_last_schedule_tasks_ = true;
+ bool did_oom_on_last_assign_ = false;
ImageManager image_manager_;
@@ -340,15 +341,18 @@ class CC_EXPORT TileManager {
UniqueNotifier signals_check_notifier_;
- bool has_scheduled_tile_tasks_;
+ bool has_scheduled_tile_tasks_ = false;
- uint64_t prepare_tiles_count_;
- uint64_t next_tile_id_;
+ uint64_t prepare_tiles_count_ = 0u;
+ uint64_t next_tile_id_ = 0u;
std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_;
std::vector<scoped_refptr<TileTask>> locked_image_tasks_;
+ uint64_t pending_activation_callback_id_ = 0;
+
base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
+ base::WeakPtrFactory<TileManager> weak_ptr_factory_;
vmpstr 2016/12/07 21:00:25 I'm assuming the two weakptrfactories here have di
DISALLOW_COPY_AND_ASSIGN(TileManager);
};

Powered by Google App Engine
This is Rietveld 408576698