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

Issue 12077046: Plumb an overscroll callback form the compositor to the Android UI thread. (Closed)

Created:
7 years, 10 months ago by mkosiba (inactive)
Modified:
7 years, 9 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, James Su, android-webview-reviews_chromium.org
Visibility:
Public.

Description

Plumb an overscroll callback form the compositor to the Android UI thread. This is a first step towards implementing overscroll on Android. BUG=

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -29 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestContainerView.java View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/compositor_frame_metadata.h View 1 chunk +3 lines, -0 lines 1 comment Download
M cc/layer_tree_host_impl.h View 1 chunk +1 line, -0 lines 1 comment Download
M cc/layer_tree_host_impl.cc View 5 chunks +9 lines, -1 line 5 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 2 chunks +2 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl_android.cc View 1 chunk +8 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_guest.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_guest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/test_render_view_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/cc_messages.h View 1 chunk +1 line, -0 lines 1 comment Download
M content/common/view_messages.h View 2 chunks +11 lines, -6 lines 1 comment Download
M content/port/browser/render_widget_host_view_port.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentView.java View 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 2 chunks +16 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl_android.cc View 1 chunk +9 lines, -7 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
mkosiba (inactive)
Hey! PTAL. Also, feel free to suggest better naming :) https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc#newcode773 ...
7 years, 10 months ago (2013-01-30 14:46:23 UTC) #1
aelias_OOO_until_Jul13
General comment, I think you'll need to gather different information for flings reaching the limit, ...
7 years, 10 months ago (2013-01-30 18:02:37 UTC) #2
aelias_OOO_until_Jul13
7 years, 10 months ago (2013-01-30 18:02:48 UTC) #3
https://codereview.chromium.org/12077046/diff/1/cc/compositor_frame_metadata.h
File cc/compositor_frame_metadata.h (right):

https://codereview.chromium.org/12077046/diff/1/cc/compositor_frame_metadata....
cc/compositor_frame_metadata.h:37: // The amount scroll delta that was unused.
Mention this is for Android overscroll.

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc
File cc/layer_tree_host_impl.cc (right):

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc#ne...
cc/layer_tree_host_impl.cc:773: m_pendingScrollDelta = gfx::Vector2dF();
I guess it's okay to do it here.  You can remove the const from the method.

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc#ne...
cc/layer_tree_host_impl.cc:1329: gfx::Vector2dF overScrollDelta = scrollDelta;
Call this "unused" for consistency.

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.cc#ne...
cc/layer_tree_host_impl.cc:1372: if (didScroll ||
!gfx::ToFlooredVector2d(overScrollDelta).IsZero()) {
I think the redraw itself is okay but let's avoid the commit and tree priority
update, you shouldn't need those.

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.h
File cc/layer_tree_host_impl.h (right):

https://codereview.chromium.org/12077046/diff/1/cc/layer_tree_host_impl.h#new...
cc/layer_tree_host_impl.h:335: mutable gfx::Vector2dF m_pendingScrollDelta;
Call this "unused" for consistency, and shouldn't be mutable.

https://codereview.chromium.org/12077046/diff/1/content/common/cc_messages.h
File content/common/cc_messages.h (right):

https://codereview.chromium.org/12077046/diff/1/content/common/cc_messages.h#...
content/common/cc_messages.h:230: IPC_STRUCT_TRAITS_MEMBER(unused_scroll_delta)
Place this at the end.

https://codereview.chromium.org/12077046/diff/1/content/common/view_messages.h
File content/common/view_messages.h (right):

https://codereview.chromium.org/12077046/diff/1/content/common/view_messages....
content/common/view_messages.h:699:
IPC_STRUCT_BEGIN(ViewHostMsg_UpdateFrameInfo_Params)
ViewHostMsg_UpdateFrameInfo is going to get deleted after
--enable-compositor-frame-message is set, so I recommend not doing this.  Just
leave them in separate values in the browser process calls and don't touch
UpdateFrameInfo in the renderer.

Powered by Google App Engine
This is Rietveld 408576698