Register fling scheduler on GSB instead of GFS.
Registering the FlingScheduler after processing a GFS causes a frame of jank at the beginning of the fling. This is because the first OnAnimationStep call after observer's registration might be missing and/or incorrectly have the timestamp of the last begin frame before the observer's registration rather than the first begin frame after the registration. To avoid this issue, in this cl we register the observer on GSB instead of GFS so that the potential missing/incorrect OnAnimationStep call passes by the time that the GFS is processed. We unregister the observer on GSE instead of when the fling stops since not all GSBs are followed by GFS events. Bug: 882907 Test: GestureEventQueueWithCompositorEventQueueTest.FlingSchedulerOpbserverRegisteredOnGSB Change-Id: I149469fce31c9146c7282bee5cba7152ee65b1ea Reviewed-on: https://chromium-review.googlesource.com/c/1313270Reviewed-by:Dave Tapuska <dtapuska@chromium.org> Commit-Queue: Sahel Sharify <sahel@chromium.org> Cr-Commit-Position: refs/heads/master@{#604707}
Showing
Please register or sign in to comment