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

Issue 172933004: [Android] Port Scroller.java to C++ and use for fling animations (Closed)

Created:
6 years, 10 months ago by jdduke (slow)
Modified:
6 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[Android] Port Scroller.java to C++ and use for fling animations Port the Android platform's Scroller.java to C++, and wire the code up to FlingAnimatorImpl. This has several benefits, including: 1) JNI hop and garbage elimination. 2) Fling updates in DIPs. 3) Animation timing independent of the Android view system. 4) Easy access to X and Y velocity components. This may also prove useful for non-fling related scroll animations, e.g., smooth scrolling from mousewheel and/or keyboard inputs on the compositor thread. BUG=344370 TBR=jochen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252789

Patch Set 1 #

Patch Set 2 : Updates #

Patch Set 3 : Rebase #

Total comments: 14

Patch Set 4 : Cleanup and code review and testing #

Patch Set 5 : Tests, cleanup and code review #

Patch Set 6 : Actually add the test #

Patch Set 7 : Cleanup #

Patch Set 8 : Cleanup #

Total comments: 10

Patch Set 9 : Code review #

Total comments: 1

Patch Set 10 : Remove forward decl #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+784 lines, -170 lines) Patch
M content/app/android/library_loader_hooks.cc View 2 chunks +0 lines, -4 lines 0 comments Download
D content/child/android/child_jni_registrar.h View 1 chunk +0 lines, -21 lines 0 comments Download
D content/child/android/child_jni_registrar.cc View 1 chunk +0 lines, -27 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
A ui/gfx/android/scroller.h View 1 2 3 4 5 6 7 8 1 chunk +148 lines, -0 lines 0 comments Download
A ui/gfx/android/scroller.cc View 1 2 3 1 chunk +436 lines, -0 lines 0 comments Download
A ui/gfx/android/scroller_unittest.cc View 1 2 3 4 5 1 chunk +143 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ui_unittests.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M webkit/child/fling_animator_impl_android.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -18 lines 0 comments Download
M webkit/child/fling_animator_impl_android.cc View 1 2 3 4 5 6 7 8 3 chunks +42 lines, -98 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jdduke (slow)
aelias@: PTAL. If you think these sensible, I'll get owners for ui/gfx and webkit/. Thanks.
6 years, 10 months ago (2014-02-21 00:21:47 UTC) #1
aelias_OOO_until_Jul13
Broadly lgtm. https://codereview.chromium.org/172933004/diff/70001/ui/gfx/android/scroller.cc File ui/gfx/android/scroller.cc (right): https://codereview.chromium.org/172933004/diff/70001/ui/gfx/android/scroller.cc#newcode14 ui/gfx/android/scroller.cc:14: const base::TimeDelta kDefaultDuration = base::TimeDelta::FromMilliseconds(250); Hmm, I'm ...
6 years, 10 months ago (2014-02-21 02:42:35 UTC) #2
jdduke (slow)
PTAL for owner review. Thanks. yfriedman@: ui/gfx/android, content/app/android jamesr@: webkit/child https://codereview.chromium.org/172933004/diff/70001/ui/gfx/android/scroller.cc File ui/gfx/android/scroller.cc (right): https://codereview.chromium.org/172933004/diff/70001/ui/gfx/android/scroller.cc#newcode14 ...
6 years, 10 months ago (2014-02-21 23:33:02 UTC) #3
jamesr
webkit/child looks good in concept, needs a few tweaks though. I assume with this change ...
6 years, 10 months ago (2014-02-21 23:41:13 UTC) #4
jdduke (slow)
On 2014/02/21 23:41:13, jamesr wrote: > webkit/child looks good in concept, needs a few tweaks ...
6 years, 10 months ago (2014-02-22 00:06:57 UTC) #5
jamesr
lgtm https://codereview.chromium.org/172933004/diff/380001/webkit/child/fling_animator_impl_android.h File webkit/child/fling_animator_impl_android.h (right): https://codereview.chromium.org/172933004/diff/380001/webkit/child/fling_animator_impl_android.h#newcode21 webkit/child/fling_animator_impl_android.h:21: class Scroller; don't need the forward decl now
6 years, 10 months ago (2014-02-22 00:17:41 UTC) #6
Yaron
rs lgtm I think aelias review is much better for this than what I could ...
6 years, 10 months ago (2014-02-22 00:38:28 UTC) #7
jdduke (slow)
jochen@: Owner review for content/child? Thanks.
6 years, 10 months ago (2014-02-22 01:30:26 UTC) #8
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 10 months ago (2014-02-22 01:30:43 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/172933004/520001
6 years, 10 months ago (2014-02-22 01:40:41 UTC) #10
commit-bot: I haz the power
6 years, 10 months ago (2014-02-22 08:41:28 UTC) #11
Message was sent while issue was closed.
Change committed as 252789

Powered by Google App Engine
This is Rietveld 408576698