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

Issue 239963002: Android: Move scheduling logic to CompositorImpl (Closed)

Created:
6 years, 8 months ago by no sievers
Modified:
6 years, 7 months ago
Reviewers:
Ted C, Sami, brianderson
CC:
chromium-reviews, darin-cc_chromium.org, jam, David Trainor- moved to gerrit, brianderson
Visibility:
Public.

Description

Android: Move scheduling logic to CompositorImpl This adds two ways of scheduling: - implicitly from LTHClient::ScheduleComposite(): This will post a task to composite immediately. - explicitly (for Chrome) through SetNeedsComposite() where there are no layer tree changes, but instead a Composite() will be scheduled for vsync with the Layout() callback giving the app a chance to update the tree. TBR=skyostil@chromium.org NOTRY=True BUG=234173 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270231

Patch Set 1 #

Total comments: 6

Patch Set 2 : rebase #

Patch Set 3 : #

Total comments: 22

Patch Set 4 : address Sami's comments #

Patch Set 5 : rebase #

Total comments: 10

Patch Set 6 : rebase #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -177 lines) Patch
M content/browser/android/content_view_render_view.h View 1 2 1 chunk +3 lines, -6 lines 0 comments Download
M content/browser/android/content_view_render_view.cc View 1 2 3 chunks +4 lines, -19 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 3 6 chunks +39 lines, -4 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 6 8 chunks +120 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 3 chunks +0 lines, -15 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java View 1 2 3 4 5 9 chunks +8 lines, -82 lines 0 comments Download
M content/public/browser/android/compositor.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M content/public/browser/android/compositor_client.h View 1 2 1 chunk +3 lines, -6 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 3 chunks +2 lines, -31 lines 0 comments Download
M ui/base/android/window_android.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M ui/base/android/window_android_compositor.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
no sievers
Sami, I haven't properly tested this at all yet. But I have naively simplified the ...
6 years, 8 months ago (2014-04-16 02:17:27 UTC) #1
Sami
Much needed cleanup, thanks! https://codereview.chromium.org/239963002/diff/1/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/239963002/diff/1/content/browser/renderer_host/compositor_impl_android.cc#newcode538 content/browser/renderer_host/compositor_impl_android.cc:538: // We already scheduled something. ...
6 years, 8 months ago (2014-04-16 15:16:30 UTC) #2
Sami
Stating the obvious: would be really nice if we figured out a way to test ...
6 years, 8 months ago (2014-04-16 17:53:26 UTC) #3
no sievers
Hey Sami, updated patch. PTAL. I've made subtle changes to the throttling and swap limit ...
6 years, 7 months ago (2014-05-09 00:30:05 UTC) #4
Sami
On 2014/05/09 00:30:05, sievers wrote: > Hey Sami, updated patch. PTAL. > > > I've ...
6 years, 7 months ago (2014-05-09 13:21:13 UTC) #5
no sievers
patch set updated. inline comments https://codereview.chromium.org/239963002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/239963002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc#newcode263 content/browser/renderer_host/compositor_impl_android.cc:263: base::MessageLoop::current()->PostDelayedTask( On 2014/05/09 13:21:14, ...
6 years, 7 months ago (2014-05-09 22:53:44 UTC) #6
no sievers
On 2014/05/09 13:21:13, Sami wrote: > I'm also wondering whether we should just bite the ...
6 years, 7 months ago (2014-05-09 23:25:56 UTC) #7
brianderson
Sorry if my comments overlap with Sami's comments, I didn't get to look at the ...
6 years, 7 months ago (2014-05-10 00:24:39 UTC) #8
no sievers
https://codereview.chromium.org/239963002/diff/80001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/239963002/diff/80001/content/browser/renderer_host/compositor_impl_android.cc#newcode290 content/browser/renderer_host/compositor_impl_android.cc:290: PostComposite(vsync_period_); On 2014/05/10 00:24:40, brianderson wrote: > Why PostComposite ...
6 years, 7 months ago (2014-05-12 19:49:40 UTC) #9
brianderson
lgtm
6 years, 7 months ago (2014-05-13 19:12:22 UTC) #10
Ted C
lgtm - owners android
6 years, 7 months ago (2014-05-13 22:12:40 UTC) #11
Sami
lgtm too, however: > Hmm if we composite on vsync, now is the vsync time. ...
6 years, 7 months ago (2014-05-13 22:31:19 UTC) #12
no sievers
The CQ bit was checked by sievers@chromium.org
6 years, 7 months ago (2014-05-13 22:33:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sievers@chromium.org/239963002/120001
6 years, 7 months ago (2014-05-13 22:36:17 UTC) #14
commit-bot: I haz the power
Change committed as 270231
6 years, 7 months ago (2014-05-13 22:41:06 UTC) #15
no sievers
6 years, 7 months ago (2014-05-13 22:51:02 UTC) #16
Message was sent while issue was closed.
On 2014/05/13 22:31:19, Sami wrote:
> lgtm too, however:
> 
> > Hmm if we composite on vsync, now is the vsync time.
> > Otherwise would we really want to use vsync time? AURA seems 
> > to be using now()
> > also.
> 
> Not exactly: now() will include random CPU jitter. Ideally we'd use the same
> time we plug into BeginFrameArgs in RWHVA::OnVSync, i.e., the vsync time. But
> let's fix this separately.

Thanks. I'll also file some other bugs for the things I know I broke, but Dana
says SingleThreadProxy with full-blown cc scheduler is likely to happen for M37,
so we can try to focus on that codepath.

Powered by Google App Engine
This is Rietveld 408576698