diff options
author | danakj <danakj@chromium.org> | 2014-11-13 18:05:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-14 02:05:39 +0000 |
commit | a819c2552ffe135e2e15fb0eb64341882a7d4912 (patch) | |
tree | 7a75706f340f7d8fd069a9f43d9452ab1bfc9220 /cc/test/layer_tree_test.h | |
parent | bf14bb992d8111b6cc6e380aa0ab3030d4ec3b05 (diff) | |
download | chromium_src-a819c2552ffe135e2e15fb0eb64341882a7d4912.zip chromium_src-a819c2552ffe135e2e15fb0eb64341882a7d4912.tar.gz chromium_src-a819c2552ffe135e2e15fb0eb64341882a7d4912.tar.bz2 |
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}
Diffstat (limited to 'cc/test/layer_tree_test.h')
-rw-r--r-- | cc/test/layer_tree_test.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index 531e28d..b801d94 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -57,9 +57,10 @@ class TestHooks : public AnimationDelegate { virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} virtual void SwapBuffersCompleteOnThread(LayerTreeHostImpl* host_impl) {} - virtual void UpdateVisibleTilesOnThread(LayerTreeHostImpl* host_impl) {} virtual void NotifyReadyToActivateOnThread(LayerTreeHostImpl* host_impl) {} virtual void NotifyReadyToDrawOnThread(LayerTreeHostImpl* host_impl) {} + virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, + const Tile* tile) {} virtual void AnimateLayers(LayerTreeHostImpl* host_impl, base::TimeTicks monotonic_time) {} virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, @@ -130,7 +131,7 @@ class LayerTreeTest : public testing::Test, public TestHooks { virtual ~LayerTreeTest(); virtual void EndTest(); - void EndTestAfterDelay(int delay_milliseconds); + void EndTestAfterDelayMs(int delay_milliseconds); void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); |