DescriptionLet the browser know the end of fling
On Android, resize event caused by showing/hiding top controls may be
expensive and cause janky fling if it is sent before the end of fling.
Let the browser know the end of fling so that the browser can delay the
resize event.
As we have not resolved the issue of raciness between the main thread
and the compositor thread, and between the renderer process and the
browser process, about the sequence of fling events and notifications,
for now we don't use the notification to update the fling status in
ContentViewGestureHandler and GestureEventFilter.
The DidStopFlinging notification is sent along the following path:
- Renderer side:
- compositor-thread-flinging:
InputHandlerProxy::CancelCurrentFling()
-> InputHandlerWrapper::DidStopFlinging()
-> InputHandlerManager::DidStopFlinging()
-> InputEventFilter::DidStopFlinging()
-> IPC::Sender::Send(ViewHostMsg_DidStopFlinging)
- main-thread-flinging (existing except the steps same as compositor-thread-flinging):
WebViewImpl::endActiveFlingAnimation()
-> RenderWidgetCompositor::didStopFlinging()
-> LayerTreeHost::didStopFlinging()
-> ThreadProxy::MainThreadHasStoppedFlinging()
-> LayerTreeHostImpl::MainThreadHasStoppedFlinging()
-> InputHandlerProxy::MainThreadHasStoppedFlinging()
then same as compositor-thread-flinging[1:]
- Browser side:
RenderWidgetHostImpl::OnMessageReceived(ViewHostMsg_DidStopFlinging)
-> RenderWidgetHostImpl::OnFlingingStopped()
// Android only. No-op on other platforms
-> RenderWidgetHostViewAndroid::DidStopFlinging()
-> ContentViewCoreImpl::DidStopFlinging()
-> ContentViewCore.onNativeFlingStopped() // Java
-> ContentViewClient.onFlingStopped()
then downstream embedder code
BUG=244736
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245624
Patch Set 1 #
Total comments: 6
Patch Set 2 : Add DidStartFlinging(); Don't bother ContentViewGestureHandler and GestureEventFilter # #
Total comments: 5
Patch Set 3 : OnStartFlingEventAck #Patch Set 4 : Pair onFlingStarted() and onFlingStopped() #
Total comments: 3
Patch Set 5 : Handle fling transition compositor->main thread #
Total comments: 5
Patch Set 6 : Finish in_process path #Patch Set 7 : SetNeedsRedraw in AnimateTopControls #
Total comments: 2
Patch Set 8 : For landing #Patch Set 9 : Fix compile break #Messages
Total messages: 47 (0 generated)
|