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

Unified Diff: cc/tiles/tile_manager.h

Issue 2924233002: cc: Move pre-decodes to background worker. (Closed)
Patch Set: flake is flaky. T_T Created 3 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
« no previous file with comments | « cc/tiles/checker_image_tracker_unittest.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.h
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index 86c66c4446efabb3b165138ebc0220b0ab5dca5b..1b08ae0eac6ca583720036e0881431c51509165f 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -104,6 +104,26 @@ RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats);
// should no longer have any memory assigned to them. Tile objects are "owned"
// by layers; they automatically register with the manager when they are
// created, and unregister from the manager when they are deleted.
+//
+// The TileManager coordinates scheduling of prioritized raster and decode work
+// across 2 different subsystems, namely the TaskGraphRunner used primarily for
+// raster work and images which must be decoded before rasterization of a tile
+// can proceed, and the CheckerImageTracker used for images decoded
+// asynchronously from raster using the |image_worker_task_runner|. The order in
+// which work is scheduled across these systems is as follows:
+//
+// 1) RequiredForActivation/Draw Tiles: These are the highest priority tiles
+// which block scheduling of any decode work for checkered-images.
+//
+// 2) Pre-paint Tiles: These are offscreen tiles which fall within the
+// pre-raster distance. The work for these tiles continues in parallel with the
+// decode work for checkered images from visible/pre-paint tiles.
+//
+// 3) Pre-decode Tiles: These are offscreen tiles which are outside the
+// pre-raster distance but have their images pre-decoded and locked. Finishing
+// work for these tiles on the TaskGraph blocks starting decode work for
+// checker-imaged pre-decode tiles.
+
class CC_EXPORT TileManager : CheckerImageTrackerClient {
public:
TileManager(TileManagerClient* client,
@@ -332,7 +352,7 @@ class CC_EXPORT TileManager : CheckerImageTrackerClient {
scoped_refptr<TileTask> CreateTaskSetFinishedTask(
void (TileManager::*callback)());
PrioritizedWorkToSchedule AssignGpuMemoryToTiles();
- void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule);
+ void ScheduleTasks(PrioritizedWorkToSchedule work_to_schedule);
void PartitionImagesForCheckering(const PrioritizedTile& prioritized_tile,
const gfx::ColorSpace& raster_color_space,
@@ -341,6 +361,7 @@ class CC_EXPORT TileManager : CheckerImageTrackerClient {
void AddCheckeredImagesToDecodeQueue(
const PrioritizedTile& prioritized_tile,
const gfx::ColorSpace& raster_color_space,
+ CheckerImageTracker::DecodeType decode_type,
CheckerImageTracker::ImageDecodeQueue* image_decode_queue);
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
« no previous file with comments | « cc/tiles/checker_image_tracker_unittest.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698