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

Unified Diff: cc/tiles/tile_manager_unittest.cc

Issue 2924233002: cc: Move pre-decodes to background worker. (Closed)
Patch Set: addressed comments 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
Index: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index d36a7824fe3f6cb1e97cf3045951b71e62a4d1af..0584bb7a0ca39dce85c44822909ff291b3c9b967 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -2527,6 +2527,11 @@ TEST_F(CheckerImagingTileManagerTest, BuildsImageDecodeQueueAsExpected) {
gfx::Rect(rect_to_raster)); // Eventually rect.
host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state());
+ // Finish all raster and dispatch completion callback so that the decode work
+ // for checkered images can be scheduled.
+ static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
+
// Run decode tasks to trigger completion of any pending decodes.
FlushDecodeTasks();
@@ -2636,6 +2641,11 @@ TEST_F(CheckerImagingTileManagerMemoryTest, AddsAllNowTilesToImageDecodeQueue) {
complete_tiling_rect); // Eventually rect.
host_impl()->tile_manager()->PrepareTiles(host_impl()->global_tile_state());
+ // Finish all raster work so the decode work for checkered images can be
+ // scheduled.
+ static_cast<SynchronousTaskGraphRunner*>(task_graph_runner())->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
+
// Flush all decode tasks. The tiles with checkered images should be
// invalidated.
FlushDecodeTasks();

Powered by Google App Engine
This is Rietveld 408576698