smooth scroll applied inconsistently when main thread is janked |
||||
Issue description1. Go to https://output.jsbin.com/deheze/quiet 2. Click Jank. While button is red, scroll down with mouse wheel by one tick. 3. Repeat step 2 several times. Result: As expected, the scroll is delayed by the jank (we block on main due to the wheel handler). However, when the jank ends, we sometimes scroll smoothly and sometimes instantly. In the current architecture I would expect only smooth scrolls. Once issue 616995 is fixed I would expect the speed to depend on where in the jank window the wheel input occurs.
,
Jun 23 2016
Try stepping through the computation of TrimTimeToCurrentIteration to see why it's returning the final duration. Is the start time set incorrectly?
,
Aug 11 2016
,
Aug 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04da03ce765e60b6081ed755b834b9e7e555a64f commit 04da03ce765e60b6081ed755b834b9e7e555a64f Author: ymalik <ymalik@chromium.org> Date: Thu Aug 18 18:38:16 2016 Fix smooth scroll animation flake on janky pages Some background: In each frame, we have AnimateLayers and after we draw we do UpdateState. A call to AnimateState ticks an animation and UpdateState adds a new animation to be ticked in subsequent frames. This CL fixes the following two cases: 1) An animation can get added at an unusual point. This can happen when GestureScrollUpdate gets delivered after we AnimateLayers but before draw and a call to UpdateState. In this case, the animation gets started with a stale start time (last_tick_time_) and a call to AnimateState will jump and "finish" the animation. To prevent this, we reset last_tick_time_ when element_animations becomes inactive. 2) An animation gets updated while it hasn't started and is in the WAITING_FOR_TARGET_AVAILABILITY state. This happens when you do two simultaneous mouse wheel ticks on a janky page. See inline comment for more details. BUG= 622553 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Review-Url: https://codereview.chromium.org/2251933002 Cr-Commit-Position: refs/heads/master@{#412898} [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/animation/element_animations.cc [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/animation/element_animations_unittest.cc [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/animation/scroll_offset_animations_impl.cc [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/test/animation_test_common.cc [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/test/animation_test_common.h [modify] https://crrev.com/04da03ce765e60b6081ed755b834b9e7e555a64f/cc/trees/layer_tree_host_impl_unittest.cc
,
Aug 18 2016
,
Aug 18 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by ymalik@chromium.org
, Jun 23 2016Labels: Hotlist-Input-Dev
6.0 MB
6.0 MB Download