Make fling gestures draw asynchronously |
||
Issue descriptionSynchronousCompositorHost::DemandDrawHwAsync draws synchronously after SynchronousCompositorHost::OnComputeScroll is called. This is to prevent webviews with child views from appearing out of sync during fling. If a webview with a child view has a fling gesture that is actually drawn asynchronously, the child view will lag behind the webview, since the webview's new position is computed asynchronously. We would like fling gestures to draw asynchronously without this behavior. We can do this by moving the logic of OnComputeScroll into DidSendBeginFrame, so that fling animations tick during vsync. Then we should make sure that apps that override OnComputeScroll (and don't call super, presumably to avoid flinging) still behave properly.
,
Jan 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/01db17ec157502d8297f1b226eb3e6669f55a456 commit 01db17ec157502d8297f1b226eb3e6669f55a456 Author: Yoland Yan <yolandyan@chromium.org> Date: Wed Jan 17 17:26:07 2018 Revert "WebView: Make draws asynchronous during fling" This reverts commit dfd1d101cc43215dbcf9fea18f60ad790bcea691. Reason for revert: this likely caused the CTS bot's scroll test to fail. https://ci.chromium.org/buildbot/chromium.android/Android%20WebView%20M%20(dbg)/11741 Failure being junit.framework.AssertionFailedError: unexpected timeout Original change's description: > WebView: Make draws asynchronous during fling > > This moves the work of OnComputeScroll into DidSendBeginFrame. > Previously, draws after calls to OnComputeScroll were synchronous so that > child views would scroll with the webview. This change makes draws after > OnComputeScroll asynchronous and ticks fling animations during BeginFrame. > > Bug: 801759 > Change-Id: Ie818644117f6345db43d11b009b92add79c2dfb2 > Reviewed-on: https://chromium-review.googlesource.com/868938 > Reviewed-by: Bo <boliu@chromium.org> > Commit-Queue: James Wallace-Lee <jamwalla@chromium.org> > Cr-Commit-Position: refs/heads/master@{#529529} TBR=boliu@chromium.org,jamwalla@chromium.org Change-Id: I5ac64c83ccbedb30283d6b6b9d6ecce60bd4d476 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 801759 Reviewed-on: https://chromium-review.googlesource.com/870571 Reviewed-by: Yoland Yan <yolandyan@chromium.org> Commit-Queue: Yoland Yan <yolandyan@chromium.org> Cr-Commit-Position: refs/heads/master@{#529786} [modify] https://crrev.com/01db17ec157502d8297f1b226eb3e6669f55a456/content/browser/android/synchronous_compositor_host.cc [modify] https://crrev.com/01db17ec157502d8297f1b226eb3e6669f55a456/content/browser/android/synchronous_compositor_host.h [modify] https://crrev.com/01db17ec157502d8297f1b226eb3e6669f55a456/content/browser/renderer_host/render_widget_host_view_android.cc
,
Feb 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e350986e1c2b136af7fd520433d68d1f63a7a575 commit e350986e1c2b136af7fd520433d68d1f63a7a575 Author: James Wallace-Lee <jamwalla@chromium.org> Date: Fri Feb 16 19:24:47 2018 WebView: Make draws asynchronous during fling and tick on renderer side Tick fling animations at the beginning of the frame, on the renderer side. This is done by calling OnComputeScroll directly from SynchronousCompositorProxy::OnBeginFrame rather than sending the ipc message from the browser side. However, we have to send the ipc once, since we shouldn't tick fling animations if a view has overridden OnComputeScroll. Previously, draws after calls to OnComputeScroll were synchronous so that child views would scroll with the webview. This change makes draws after OnComputeScroll asynchronous and ticks fling animations during BeginFrame. Bug: 801759 Change-Id: Iaf95ecc44586ae212630602b38b3ab570b27132b Reviewed-on: https://chromium-review.googlesource.com/894176 Commit-Queue: James Wallace-Lee <jamwalla@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#537375} [modify] https://crrev.com/e350986e1c2b136af7fd520433d68d1f63a7a575/content/renderer/android/synchronous_compositor_proxy.cc [modify] https://crrev.com/e350986e1c2b136af7fd520433d68d1f63a7a575/content/renderer/android/synchronous_compositor_proxy.h
,
Feb 22 2018
\o/ |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jan 17 2018