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

Issue 611313003: Use estimated vsync period on Android (Closed)

Created:
6 years, 2 months ago by jmanko
Modified:
6 years, 2 months ago
CC:
chromium-reviews, jdduke (slow), Sami (do not use), orglofch, brianderson
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use estimated vsync period on Android Use estimated vsync period to deal with buggy getRefreshRate() implementations BUG=418955 Committed: https://crrev.com/4a431e84243bdbdc2c965ca0ebde9ce07505cae5 Cr-Commit-Position: refs/heads/master@{#298699}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review follow-up #

Total comments: 4

Patch Set 3 : Review follow-up, added test for estimated vsync period #

Total comments: 5

Patch Set 4 : Only update refresh period during consecutive vsyncs #

Total comments: 3

Patch Set 5 : Simplified refresh period formula, indents #

Patch Set 6 : Compilation fix #

Total comments: 3

Patch Set 7 : Change lastRefreshDurationWeight. Use estimation also when getRefreshRate() is <= 0. #

Total comments: 5

Patch Set 8 : Remove unused constant #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -17 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/VSyncMonitor.java View 1 2 3 4 5 6 7 5 chunks +17 lines, -1 line 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M ui/base/android/window_android.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M ui/base/android/window_android.cc View 1 2 2 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 46 (9 generated)
jmanko
Proposed fix for invalid vsync period on Android
6 years, 2 months ago (2014-09-30 14:51:36 UTC) #2
jdduke (slow)
Adding sievers@ as a more suitable reviewer for this code.
6 years, 2 months ago (2014-09-30 14:57:30 UTC) #4
Miguel Garcia
On 2014/09/30 14:57:30, jdduke wrote: > Adding sievers@ as a more suitable reviewer for this ...
6 years, 2 months ago (2014-09-30 15:04:56 UTC) #5
Sami
+mithro who is looking at frame time estimation. https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode92 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:92: // ...
6 years, 2 months ago (2014-09-30 16:04:15 UTC) #8
jmanko
https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode92 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:92: // Display.getRefreshRate() is unreliable on some platforms. On 2014/09/30 ...
6 years, 2 months ago (2014-10-01 09:36:51 UTC) #9
Sami
https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/1/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode99 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:99: mRefreshPeriodNano = (mRefreshPeriodNano + lastRefreshDurationNano) / 2; On 2014/10/01 ...
6 years, 2 months ago (2014-10-01 09:39:34 UTC) #10
jmanko
Thanks Sami, I've applied your suggestions
6 years, 2 months ago (2014-10-01 11:36:39 UTC) #11
Sami
Thanks. I've added some comments. Could we have a test for this too? https://codereview.chromium.org/611313003/diff/20001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ...
6 years, 2 months ago (2014-10-01 11:42:50 UTC) #12
jmanko
On 2014/10/01 11:42:50, Sami wrote: > Thanks. I've added some comments. Could we have a ...
6 years, 2 months ago (2014-10-01 14:18:57 UTC) #13
mithro-old
I'd really like to take a look at this before you land it, however I ...
6 years, 2 months ago (2014-10-01 14:45:26 UTC) #14
no sievers
nit: can you update the description that this estimates vsync to deal with buggy getRefreshRate() ...
6 years, 2 months ago (2014-10-01 17:48:09 UTC) #15
mithro-old
As a temporary fix, I think this change looks okay. However, long term I think ...
6 years, 2 months ago (2014-10-02 07:05:40 UTC) #16
Sami
On 2014/10/02 07:05:40, mithro wrote: > Can't this be done easier and in a more ...
6 years, 2 months ago (2014-10-02 09:34:56 UTC) #17
jmanko
On 2014/10/02 09:34:56, Sami wrote: > On 2014/10/02 07:05:40, mithro wrote: > > Can't this ...
6 years, 2 months ago (2014-10-02 12:02:00 UTC) #18
jmanko
https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode102 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:102: mRefreshPeriodNano = (mRefreshPeriodNano + lastRefreshDurationNano) / 2; On 2014/10/01 ...
6 years, 2 months ago (2014-10-02 12:02:29 UTC) #19
Sami
On 2014/10/02 12:02:00, jmanko wrote: > Could you advice a good way to check if ...
6 years, 2 months ago (2014-10-02 12:31:29 UTC) #20
jmanko
On 2014/10/02 12:31:29, Sami wrote: > On 2014/10/02 12:02:00, jmanko wrote: > > Could you ...
6 years, 2 months ago (2014-10-02 15:10:23 UTC) #21
Sami
https://codereview.chromium.org/611313003/diff/60001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/60001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode92 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:92: mRefreshPeriodNano > MAX_VALID_VSYNC_PERIOD_NANOSECONDS; Indent by +4 spaces. https://codereview.chromium.org/611313003/diff/60001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode103 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:103: ...
6 years, 2 months ago (2014-10-02 15:52:31 UTC) #22
no sievers
https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode102 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:102: mRefreshPeriodNano = (mRefreshPeriodNano + lastRefreshDurationNano) / 2; On 2014/10/02 ...
6 years, 2 months ago (2014-10-02 19:51:42 UTC) #23
jmanko
https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/40001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode102 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:102: mRefreshPeriodNano = (mRefreshPeriodNano + lastRefreshDurationNano) / 2; On 2014/10/02 ...
6 years, 2 months ago (2014-10-03 09:10:54 UTC) #24
jmanko
On 2014/10/02 15:52:31, Sami wrote: > https://codereview.chromium.org/611313003/diff/60001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java > File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): > > https://codereview.chromium.org/611313003/diff/60001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode92 > ...
6 years, 2 months ago (2014-10-03 09:15:01 UTC) #25
Sami
lgtm, but let's still let Daniel have one more look at this.
6 years, 2 months ago (2014-10-03 13:10:09 UTC) #26
no sievers
https://codereview.chromium.org/611313003/diff/100001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/100001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode30 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:30: private boolean mConsecutiveVSync = false; nit: Can you put ...
6 years, 2 months ago (2014-10-03 18:14:54 UTC) #27
jmanko
On 2014/10/03 18:14:54, sievers wrote: > https://codereview.chromium.org/611313003/diff/100001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java > File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): > > https://codereview.chromium.org/611313003/diff/100001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode30 > ...
6 years, 2 months ago (2014-10-06 09:37:44 UTC) #28
no sievers
lgtm thanks!
6 years, 2 months ago (2014-10-06 18:24:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/611313003/120001
6 years, 2 months ago (2014-10-07 08:40:18 UTC) #33
jmanko
On 2014/10/06 18:24:33, sievers wrote: > lgtm thanks! Great, thanks for reviewing! How do I ...
6 years, 2 months ago (2014-10-07 08:42:32 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/15946)
6 years, 2 months ago (2014-10-07 08:49:18 UTC) #36
mithro-old
On 2014/10/07 08:42:32, jmanko wrote: > On 2014/10/06 18:24:33, sievers wrote: > > lgtm thanks! ...
6 years, 2 months ago (2014-10-07 08:56:21 UTC) #37
jmanko
On 2014/10/07 08:56:21, mithro wrote: > On 2014/10/07 08:42:32, jmanko wrote: > > On 2014/10/06 ...
6 years, 2 months ago (2014-10-07 09:10:19 UTC) #38
jdduke (slow)
Sorry for the delayed review. https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode27 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:27: private static final long ...
6 years, 2 months ago (2014-10-08 03:17:03 UTC) #39
jmanko
On 2014/10/08 03:17:03, jdduke wrote: > Sorry for the delayed review. > > https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java > ...
6 years, 2 months ago (2014-10-08 09:47:00 UTC) #40
Sami
https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode106 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:106: mRefreshPeriodNano += (long) (lastRefreshDurationWeight * On 2014/10/08 03:17:02, jdduke ...
6 years, 2 months ago (2014-10-08 10:14:51 UTC) #41
jdduke (slow)
lgtm, thanks. https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java File ui/android/java/src/org/chromium/ui/VSyncMonitor.java (right): https://codereview.chromium.org/611313003/diff/120001/ui/android/java/src/org/chromium/ui/VSyncMonitor.java#newcode106 ui/android/java/src/org/chromium/ui/VSyncMonitor.java:106: mRefreshPeriodNano += (long) (lastRefreshDurationWeight * On 2014/10/08 ...
6 years, 2 months ago (2014-10-08 13:06:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/611313003/140001
6 years, 2 months ago (2014-10-08 13:09:07 UTC) #44
commit-bot: I haz the power
Committed patchset #8 (id:140001) as f62704ac5b986ad8311c9bdeebf79fa5b4d63394
6 years, 2 months ago (2014-10-08 14:05:02 UTC) #45
commit-bot: I haz the power
6 years, 2 months ago (2014-10-08 14:06:02 UTC) #46
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4a431e84243bdbdc2c965ca0ebde9ce07505cae5
Cr-Commit-Position: refs/heads/master@{#298699}

Powered by Google App Engine
This is Rietveld 408576698