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

Unified Diff: cc/tiles/tile_manager.cc

Issue 2537683002: cc: Add image decode queue functionality to image manager. (Closed)
Patch Set: test fix Created 3 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/tiles/tile_manager.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index 1e948f1e15f098b97008bc2921f7e2349864a37c..02cffea5370815cde207f090b33040c61bab3ac6 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -342,13 +342,15 @@ RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats) {
return std::move(state);
}
-TileManager::TileManager(TileManagerClient* client,
- base::SequencedTaskRunner* task_runner,
- size_t scheduled_raster_task_limit,
- bool use_partial_raster,
- bool check_tile_priority_inversion)
+TileManager::TileManager(
+ TileManagerClient* client,
+ base::SequencedTaskRunner* origin_task_runner,
+ scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner,
+ size_t scheduled_raster_task_limit,
+ bool use_partial_raster,
+ bool check_tile_priority_inversion)
: client_(client),
- task_runner_(task_runner),
+ task_runner_(origin_task_runner),
resource_pool_(nullptr),
tile_task_manager_(nullptr),
scheduled_raster_task_limit_(scheduled_raster_task_limit),
@@ -357,6 +359,8 @@ TileManager::TileManager(TileManagerClient* client,
all_tiles_that_need_to_be_rasterized_are_scheduled_(true),
did_check_for_completed_tasks_since_last_schedule_tasks_(true),
did_oom_on_last_assign_(false),
+ image_controller_(origin_task_runner,
+ std::move(image_worker_task_runner)),
more_tiles_need_prepare_check_notifier_(
task_runner_,
base::Bind(&TileManager::CheckIfMoreTilesNeedToBePrepared,
@@ -1064,6 +1068,13 @@ void TileManager::OnRasterTaskCompleted(
client_->NotifyTileStateChanged(tile);
}
+void TileManager::SetDecodedImageTracker(
+ DecodedImageTracker* decoded_image_tracker) {
+ // TODO(vmpstr): If the tile manager needs to request out-of-raster decodes,
+ // it should retain and use |decoded_image_tracker| here.
+ decoded_image_tracker->set_image_controller(&image_controller_);
+}
+
std::unique_ptr<Tile> TileManager::CreateTile(const Tile::CreateInfo& info,
int layer_id,
int source_frame_number,
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698