Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Issue 2040543002: Take MT jank into account when animating the scroll offset on CC (Closed)

Created:
4 years, 6 months ago by ymalik
Modified:
4 years, 3 months ago
Reviewers:
ajuma, skobes, tdresser
CC:
chromium-reviews, cc-bugs_chromium.org, dtapuska+chromiumwatch_chromium.org, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Take MT jank into account when animating the scroll offset on CC This CL calculates the jank by subtracting base::TimeTicks::Now from the event platform time when GestureScrollUpdate is called. BUG=616995 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/ddfc352c8851b8eaee293446048316c84cbabc7d Cr-Commit-Position: refs/heads/master@{#416561}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix plumbing #

Patch Set 3 : fix constant #

Total comments: 2

Patch Set 4 : use timestamp of input event rather than latency info #

Patch Set 5 : Add delay to UpdateTarget and plumb TimeDelta instead of TimeTick #

Patch Set 6 : rebase master #

Patch Set 7 : Add tests #

Patch Set 8 : Remove unused plumbing #

Total comments: 21

Patch Set 9 : Review feedback from tdresser@ #

Total comments: 8

Patch Set 10 : rebase master #

Patch Set 11 : Apply Steve's comments #

Patch Set 12 : Remove special-case from updateTarget #

Patch Set 13 : fix UpdateTarget #

Total comments: 1

Patch Set 14 : apply skobes feedback #

Total comments: 1

Patch Set 15 : add test + apply suggested improvement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -74 lines) Patch
M cc/animation/animation_host.h View 1 2 3 4 5 6 10 11 1 chunk +4 lines, -2 lines 0 comments Download
M cc/animation/animation_host.cc View 1 2 3 4 5 10 11 1 chunk +7 lines, -4 lines 0 comments Download
M cc/animation/animation_host_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -1 line 0 comments Download
M cc/animation/scroll_offset_animation_curve.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +59 lines, -30 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +59 lines, -3 lines 0 comments Download
M cc/animation/scroll_offset_animations_impl.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M cc/animation/scroll_offset_animations_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -3 lines 0 comments Download
M cc/input/input_handler.h View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M cc/layers/viewport.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/viewport.cc View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +14 lines, -10 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +53 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/blink/input_handler_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -3 lines 0 comments Download
M ui/events/blink/input_handler_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 52 (20 generated)
skobes
https://codereview.chromium.org/2040543002/diff/1/cc/input/input_handler.h File cc/input/input_handler.h (right): https://codereview.chromium.org/2040543002/diff/1/cc/input/input_handler.h#newcode135 cc/input/input_handler.h:135: virtual void AdjustDuration(base::TimeDelta) = 0; I don't think we ...
4 years, 6 months ago (2016-06-08 22:47:28 UTC) #3
ymalik
@skobes, can you please do an initial round of review (and play with it) before ...
4 years, 6 months ago (2016-06-21 23:46:02 UTC) #5
ymalik
+tdresser to comment on the use of LatencyComponentType::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT and subtracting it from base::TimeTicks::Now to calculate ...
4 years, 6 months ago (2016-06-21 23:48:24 UTC) #7
skobes
I tried to verify this change with a test page at https://output.jsbin.com/deheze/quiet but something weird ...
4 years, 6 months ago (2016-06-23 01:33:42 UTC) #8
skobes
On 2016/06/23 01:33:42, skobes wrote: > I tried to verify this change with a test ...
4 years, 6 months ago (2016-06-23 01:53:32 UTC) #9
ymalik
@skobes, @tdresser, PTAL :)
4 years, 3 months ago (2016-08-24 19:25:09 UTC) #11
ymalik
4 years, 3 months ago (2016-08-24 19:26:07 UTC) #13
tdresser
https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc#newcode65 cc/animation/scroll_offset_animation_curve.cc:65: base::TimeDelta td = base::TimeDelta::FromMicroseconds( td -> time_delta https://google.github.io/styleguide/cppguide.html#General_Naming_Rules 'Give ...
4 years, 3 months ago (2016-08-25 15:55:54 UTC) #14
tdresser
Sorry, I misread the TimeDelta class... https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc#newcode69 cc/animation/scroll_offset_animation_curve.cc:69: if (td >= ...
4 years, 3 months ago (2016-08-29 14:31:33 UTC) #15
ymalik
@tdresser, PTAL :) https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc#newcode65 cc/animation/scroll_offset_animation_curve.cc:65: base::TimeDelta td = base::TimeDelta::FromMicroseconds( On 2016/08/25 ...
4 years, 3 months ago (2016-08-29 14:52:06 UTC) #16
ymalik
@tdresser, PTAL :) https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc#newcode65 cc/animation/scroll_offset_animation_curve.cc:65: base::TimeDelta td = base::TimeDelta::FromMicroseconds( On 2016/08/25 ...
4 years, 3 months ago (2016-08-29 14:52:06 UTC) #17
tdresser
LGTM. https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/140001/cc/animation/scroll_offset_animation_curve.cc#newcode209 cc/animation/scroll_offset_animation_curve.cc:209: if (t == 0) { On 2016/08/29 14:52:05, ...
4 years, 3 months ago (2016-08-29 15:28:28 UTC) #18
ajuma
lgtm too
4 years, 3 months ago (2016-08-29 22:01:07 UTC) #20
skobes
https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc#newcode131 cc/animation/scroll_offset_animation_curve.cc:131: if (has_set_initial_value_ && duration.is_zero()) Does it ever make sense ...
4 years, 3 months ago (2016-08-29 22:13:12 UTC) #21
ymalik
@skobes, PTAL :) https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc#newcode131 cc/animation/scroll_offset_animation_curve.cc:131: if (has_set_initial_value_ && duration.is_zero()) On 2016/08/29 ...
4 years, 3 months ago (2016-08-29 23:44:06 UTC) #22
skobes
https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc#newcode210 cc/animation/scroll_offset_animation_curve.cc:210: // Just update the target since the animation hasn't ...
4 years, 3 months ago (2016-08-29 23:49:44 UTC) #23
ymalik
@skobes, PTAL :) https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/160001/cc/animation/scroll_offset_animation_curve.cc#newcode210 cc/animation/scroll_offset_animation_curve.cc:210: // Just update the target since ...
4 years, 3 months ago (2016-09-01 15:31:13 UTC) #24
skobes
lgtm
4 years, 3 months ago (2016-09-01 18:20:09 UTC) #25
ymalik
@skobes, PTAL I had missed two cases. The first is that give that we are ...
4 years, 3 months ago (2016-09-01 22:04:39 UTC) #36
ymalik
https://codereview.chromium.org/2040543002/diff/240001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/2040543002/diff/240001/cc/animation/scroll_offset_animation_curve.cc#newcode219 cc/animation/scroll_offset_animation_curve.cc:219: (t - last_retarget_.InSecondsF()) / old_duration); The Velocity function expects ...
4 years, 3 months ago (2016-09-01 22:06:10 UTC) #37
ymalik
4 years, 3 months ago (2016-09-01 22:06:12 UTC) #38
skobes
On 2016/09/01 22:04:39, ymalik wrote: > @skobes, PTAL > > I had missed two cases. ...
4 years, 3 months ago (2016-09-01 23:05:26 UTC) #39
skobes
On 2016/09/01 23:05:26, skobes wrote: > If t is 0 (after this clamping), it makes ...
4 years, 3 months ago (2016-09-01 23:10:59 UTC) #40
ymalik
On 2016/09/01 23:10:59, skobes wrote: > On 2016/09/01 23:05:26, skobes wrote: > > If t ...
4 years, 3 months ago (2016-09-01 23:20:50 UTC) #41
skobes
On 2016/09/01 23:20:50, ymalik wrote: > Does this patch still LGTY? :) Something feels wrong ...
4 years, 3 months ago (2016-09-01 23:38:56 UTC) #42
ymalik
On 2016/09/01 23:38:56, skobes wrote: > On 2016/09/01 23:20:50, ymalik wrote: > > Does this ...
4 years, 3 months ago (2016-09-02 01:09:12 UTC) #43
skobes
Sorry, just one more tweak that's occurred to me. Thanks for your patience. :) https://codereview.chromium.org/2040543002/diff/260001/cc/animation/scroll_offset_animation_curve.cc ...
4 years, 3 months ago (2016-09-02 01:27:56 UTC) #44
ymalik
On 2016/09/02 01:27:56, skobes wrote: > Sorry, just one more tweak that's occurred to me. ...
4 years, 3 months ago (2016-09-02 14:50:30 UTC) #45
skobes
lgtm
4 years, 3 months ago (2016-09-02 16:34:21 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2040543002/280001
4 years, 3 months ago (2016-09-05 17:36:06 UTC) #49
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 3 months ago (2016-09-05 18:40:55 UTC) #50
commit-bot: I haz the power
4 years, 3 months ago (2016-09-05 18:42:12 UTC) #52
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/ddfc352c8851b8eaee293446048316c84cbabc7d
Cr-Commit-Position: refs/heads/master@{#416561}

Powered by Google App Engine
This is Rietveld 408576698