| Index: cc/trees/layer_tree_host_unittest_checkerimaging.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_checkerimaging.cc b/cc/trees/layer_tree_host_unittest_checkerimaging.cc
|
| index 692bb747cebc75956dfbdbc1f9ade15cbab2bc44..7dd7bdcd2b213a6ac939e1ec20e04da2ba4c6066 100644
|
| --- a/cc/trees/layer_tree_host_unittest_checkerimaging.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_checkerimaging.cc
|
| @@ -81,18 +81,30 @@ class LayerTreeHostCheckerImagingTestMergeWithMainFrame
|
| }
|
| }
|
|
|
| + void NotifyAllTileTasksCompleted(LayerTreeHostImpl* host_impl) override {
|
| + // Wait until all tile tasks have finished before flushing the decode tasks.
|
| + // The CheckerImageTracker does not queue decode work until higher priority
|
| + // raster work has finished.
|
| +
|
| + // Run all tasks on the image worker to ensure that the decode completion
|
| + // triggers an impl-side invalidation request.
|
| + FlushImageDecodeTasks();
|
| +
|
| + // Request a commit to ensure that this invalidation is merged with the
|
| + // incoming frame.
|
| + host_impl->GetTaskRunner()->PostTask(
|
| + FROM_HERE, base::Bind(&LayerTreeHostImpl::SetNeedsCommit,
|
| + base::Unretained(host_impl)));
|
| + }
|
| +
|
| void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
|
| switch (++num_of_commits_) {
|
| - case 1: {
|
| - // The first commit has happened. Run all tasks on the image worker to
|
| - // ensure that the decode completion triggers an impl-side invalidation
|
| - // request.
|
| - FlushImageDecodeTasks();
|
| -
|
| - // Block notifying the scheduler of this request until we get a commit.
|
| + case 1:
|
| + // Block notifying the scheduler of this request until we've had a
|
| + // chance to make sure that the decode work was scheduled, flushed and
|
| + // the commit requested after it is received.
|
| host_impl->BlockImplSideInvalidationRequestsForTesting(true);
|
| - host_impl->SetNeedsCommit();
|
| - } break;
|
| + break;
|
| case 2: {
|
| // Ensure that the expected tiles are invalidated on the sync tree.
|
| PictureLayerImpl* sync_layer_impl = static_cast<PictureLayerImpl*>(
|
| @@ -102,7 +114,9 @@ class LayerTreeHostCheckerImagingTestMergeWithMainFrame
|
| ->FindTilingWithResolution(TileResolution::HIGH_RESOLUTION);
|
|
|
| for (int i = 0; i < 4; i++) {
|
| + SCOPED_TRACE(i);
|
| for (int j = 0; j < 2; j++) {
|
| + SCOPED_TRACE(j);
|
| Tile* tile =
|
| sync_tiling->TileAt(i, j) ? sync_tiling->TileAt(i, j) : nullptr;
|
|
|
|
|