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

Issue 236193013: Android: Consolidate and simplify VSync logic (Closed)

Created:
6 years, 8 months ago by no sievers
Modified:
6 years, 7 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, miu+watch_chromium.org, trchen
Visibility:
Public.

Description

Android: Consolidate and simplify VSync logic This moves handling of VSync over to WindowAndroid. It can have one client to receive vsync signals for the main browser-side scheduling logic. It also forwards the vsync to the WindowAndroidObservers, i.e. RenderWidgetHostView where it's used for sending BeginFrame signals to the renderer. This prepares for consolidating the scheduling logic in a single place upstream. Which will then further allow us to use the cc scheduler (with SingleThreadProxy) and unblock the landing of https://codereview.chromium.org/134623005/. BUG=234173, 363479 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266995

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : #

Total comments: 32

Patch Set 4 : rebase #

Patch Set 5 : address comments #

Patch Set 6 : rebase + TODO #

Patch Set 7 : indent #

Patch Set 8 : fix test #

Patch Set 9 : fix test more #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -616 lines) Patch
M chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 chunks +0 lines, -13 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 5 chunks +0 lines, -81 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 6 chunks +52 lines, -27 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 chunks +0 lines, -128 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java View 1 2 3 4 5 6 9 chunks +15 lines, -80 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/VSyncManager.java View 1 chunk +0 lines, -36 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/VSyncMonitor.java View 1 chunk +0 lines, -224 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java View 1 1 chunk +1 line, -0 lines 0 comments Download
A + ui/android/java/src/org/chromium/ui/VSyncMonitor.java View 1 2 3 4 4 chunks +15 lines, -13 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 2 3 4 5 6 8 chunks +50 lines, -3 lines 0 comments Download
M ui/base/android/window_android.h View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M ui/base/android/window_android.cc View 1 2 3 2 chunks +17 lines, -4 lines 0 comments Download
M ui/base/android/window_android_observer.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
no sievers
sami: everything dtrainor: Java things (it mostly removes code) brianderson: at least render_widget_host_view_android.cc jared: to ...
6 years, 8 months ago (2014-04-15 21:19:26 UTC) #1
jdduke (slow)
Sweet hallelujah this is nice. overscroll/input in render_widget_host_view_android lgtm. https://codereview.chromium.org/236193013/diff/20001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/236193013/diff/20001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode492 content/browser/renderer_host/render_widget_host_view_android.cc:492: ...
6 years, 8 months ago (2014-04-15 22:08:43 UTC) #2
no sievers
https://codereview.chromium.org/236193013/diff/20001/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java File content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java (right): https://codereview.chromium.org/236193013/diff/20001/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java#newcode115 content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java:115: TraceEvent.instant("ContentViewRenderView:bail"); So the 'bail' path should probably call mRootWindow.requestVSyncUpdate().
6 years, 8 months ago (2014-04-16 01:19:54 UTC) #3
David Trainor- moved to gerrit
lgtm https://codereview.chromium.org/236193013/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java File content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java (right): https://codereview.chromium.org/236193013/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java#newcode30 content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java:30: public class ContentViewRenderView extends FrameLayout implements WindowAndroid.VSyncClient { ...
6 years, 8 months ago (2014-04-16 06:18:19 UTC) #4
Sami
Yay, WindowAndroid is a much better home for this stuff. Thanks! https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): ...
6 years, 8 months ago (2014-04-16 17:26:53 UTC) #5
brianderson
https://codereview.chromium.org/236193013/diff/40001/ui/base/android/window_android_observer.h File ui/base/android/window_android_observer.h (right): https://codereview.chromium.org/236193013/diff/40001/ui/base/android/window_android_observer.h#newcode19 ui/base/android/window_android_observer.h:19: base::TimeDelta vsync_period) {} Should this also be pure virtual?
6 years, 8 months ago (2014-04-17 01:05:02 UTC) #6
no sievers
https://codereview.chromium.org/236193013/diff/20001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/236193013/diff/20001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode492 content/browser/renderer_host/render_widget_host_view_android.cc:492: "enabled", enabled); On 2014/04/15 22:08:43, jdduke wrote: > On ...
6 years, 8 months ago (2014-04-25 22:23:33 UTC) #7
brianderson
https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1167 content/browser/renderer_host/render_widget_host_view_android.cc:1167: // Send a proactive BeginFrame on the next vsync ...
6 years, 8 months ago (2014-04-25 23:26:02 UTC) #8
no sievers
On 2014/04/25 23:26:02, brianderson wrote: > https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc > File content/browser/renderer_host/render_widget_host_view_android.cc (right): > > https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1167 > ...
6 years, 7 months ago (2014-04-28 16:13:53 UTC) #9
Sami
On 2014/04/28 16:13:53, sievers wrote: > On 2014/04/25 23:26:02, brianderson wrote: > > > https://codereview.chromium.org/236193013/diff/40001/content/browser/renderer_host/render_widget_host_view_android.cc ...
6 years, 7 months ago (2014-04-28 16:21:52 UTC) #10
Sami
lgtm with the TODO about figuring out proactive BeginFrames.
6 years, 7 months ago (2014-04-28 17:28:30 UTC) #11
no sievers
+Ted for OWNERS
6 years, 7 months ago (2014-04-28 23:19:08 UTC) #12
Ted C
lgtm - OWNERS
6 years, 7 months ago (2014-04-28 23:28:46 UTC) #13
no sievers
The CQ bit was checked by sievers@chromium.org
6 years, 7 months ago (2014-04-29 23:30:49 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sievers@chromium.org/236193013/180001
6 years, 7 months ago (2014-04-29 23:33:11 UTC) #15
commit-bot: I haz the power
6 years, 7 months ago (2014-04-29 23:40:35 UTC) #16
Message was sent while issue was closed.
Change committed as 266995

Powered by Google App Engine
This is Rietveld 408576698