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

Issue 1458453003: Add mojo service to get notified of vsync. (Closed)

Created:
5 years, 1 month ago by qsr
Modified:
5 years, 1 month ago
Reviewers:
ppi, abarth-chromium
CC:
abarth-chromium, Aaron Boodman, ben+mojo_chromium.org, darin (slow to review), gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Simplify threading. #

Patch Set 3 : Add comment #

Total comments: 14

Patch Set 4 : Follow review #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -5 lines) Patch
A + mojo/services/vsync/interfaces/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
A mojo/services/vsync/interfaces/vsync.mojom View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A + services/vsync/BUILD.gn View 1 chunk +3 lines, -3 lines 0 comments Download
A services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java View 1 2 3 1 chunk +81 lines, -0 lines 2 comments Download
M shell/BUILD.gn View 3 chunks +3 lines, -0 lines 0 comments Download
M shell/android/apk/src/org/chromium/mojo/shell/JavaApplicationRegistry.java View 1 2 3 4 chunks +10 lines, -1 line 0 comments Download
A shell/android/apk/src/org/chromium/mojo/shell/VsyncFactory.java View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
qsr
5 years, 1 month ago (2015-11-17 15:10:19 UTC) #1
ppi
https://codereview.chromium.org/1458453003/diff/40001/mojo/services/vsync/interfaces/vsync.mojom File mojo/services/vsync/interfaces/vsync.mojom (right): https://codereview.chromium.org/1458453003/diff/40001/mojo/services/vsync/interfaces/vsync.mojom#newcode9 mojo/services/vsync/interfaces/vsync.mojom:9: // Timebase is in MojoGetTimeTicksNow. Please document what this ...
5 years, 1 month ago (2015-11-17 16:40:46 UTC) #2
qsr
https://codereview.chromium.org/1458453003/diff/40001/mojo/services/vsync/interfaces/vsync.mojom File mojo/services/vsync/interfaces/vsync.mojom (right): https://codereview.chromium.org/1458453003/diff/40001/mojo/services/vsync/interfaces/vsync.mojom#newcode9 mojo/services/vsync/interfaces/vsync.mojom:9: // Timebase is in MojoGetTimeTicksNow. On 2015/11/17 16:40:46, ppi ...
5 years, 1 month ago (2015-11-17 17:19:41 UTC) #3
ppi
lgtm
5 years, 1 month ago (2015-11-17 17:54:22 UTC) #4
qsr
Committed patchset #4 (id:60001) manually as 057118f7d346a5633044bd1ab4459d973b96e952 (presubmit successful).
5 years, 1 month ago (2015-11-17 17:59:54 UTC) #5
abarth-chromium
https://codereview.chromium.org/1458453003/diff/60001/services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java File services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java (right): https://codereview.chromium.org/1458453003/diff/60001/services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java#newcode73 services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java:73: mRunLoop.postDelayedTask(new Runnable() { Why do we need an extra ...
5 years, 1 month ago (2015-11-17 18:03:36 UTC) #7
qsr
5 years, 1 month ago (2015-11-18 13:16:56 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1458453003/diff/60001/services/vsync/src/org/...
File services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java (right):

https://codereview.chromium.org/1458453003/diff/60001/services/vsync/src/org/...
services/vsync/src/org/chromium/mojo/vsync/VSyncProviderImpl.java:73:
mRunLoop.postDelayedTask(new Runnable() {
On 2015/11/17 18:03:36, abarth-chromium wrote:
> Why do we need an extra thread hop here?  The Sky version of this class
doesn't
> need the thread hop.  This adds yet-another-context-switch to the main
animation
> pipeline, which reduces the amount of time we have to do real work per frame.

My guess is that sky is using the main thread to run this code? By default, out
of the main thread, a thread has only one of a MessageLoop and a Looper. We need
a MessageLoop to listen on mojo handler, and Choreographer needs a Looper to
send its callbacks. That's why we have this thread hop.

I changed this in https://codereview.chromium.org/1456913002/ by creating a new
thread with both looper and message loop for this service.

Powered by Google App Engine
This is Rietveld 408576698