[go: nahoru, domu]

SetNeedsRedraw directly when updating a visible tile.

Removes the UpdateVisibleTiles scheduler state, instead if the
current set of raster tasks starts with a visible tile, we
optimistically call SetNeedsRedraw() at the start of each impl
frame to cause us to try and draw. At draw time we
UpdateVisibleTiles in the tile manager to collect any completed
tasks.

To handle other cases, whenever a visible tile is completed, we
call SetNeedsRedraw() in addition to setting damage on the layer.

Last, when NotifyReadyToDraw() happens, we have a complete frame,
so we can stop optimistically calling SetNeedsRedraw() at the
start of each impl frame.

This allows us to remove the full viewport damage when ending a
pinch gesture.

This change adds 2 integration unit tests for pinch zoom. The
first ensures that when a pinch ends we don't leave blurry tiles
on the screen, but update them to ideal. The second ensures we
continuously try to draw while we have an incomplete frame.

BUG=427423

Review URL: https://codereview.chromium.org/671653005

Cr-Commit-Position: refs/heads/master@{#304147}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 55c6c05d..a296bb0c 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -544,6 +544,7 @@
     "test/fake_picture_layer_impl.h",
     "test/fake_picture_layer_tiling_client.cc",
     "test/fake_picture_layer_tiling_client.h",
+    "test/fake_picture_pile.cc",
     "test/fake_picture_pile.h",
     "test/fake_picture_pile_impl.cc",
     "test/fake_picture_pile_impl.h",