New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 733435 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-XR
Proj-XR-VR



Sign in to add a comment

VSync timing drifts due to inaccurate interval

Project Member Reported by klausw@chromium.org, Jun 14 2017

Issue description

Currently, VrShellGl does its own timing calculations, using timebase + num_intervals * vsync_interval to get successive VSync time points.

However, currently vsync_interval is implemented as a base::TimeDelta which has microsecond resolution, with ~1/3 (or 2/3) of a microsecond error. After one minute of presentation, num_intervals is 3600, and the error gets amplified to ~1ms, and after a few minutes the time used will be out of sync with actual vsync time.

Also, we're currently using getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRefreshRate() for the vsync interval. We should confirm that this number is itself sufficiently accurate if extrapolating future vsync times.

Consider running VrShellDelegate's choreographer.postFrameCallback() continuously and periodically refreshing VrShellGl's vsync timing. This doesn't need to be propagated every frame, just often enough to ensure that any drift remains acceptable.
 
Cc: vollick@chromium.org mthiesse@chromium.org
Labels: M-61
Status: Available (was: Untriaged)
What is the user impact? Does this affect the VR browser? P3 seems low. Does it need to be fixed in M61?
Labels: -Pri-3 Pri-2
Not sure exactly what the impact is, but it's pretty trivial to fix, so we might as well up the priority and get it in for 61.
Owner: mthiesse@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af

commit db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Fri Jul 07 14:44:06 2017

VR: Fix VSync drift.

Hooks into Android choreographer to regularly update the VSync timebase
and interval when necessary.

Bug:  733435 
Change-Id: I77716e3abe89388bb56f7cac99e541dd5749290a
Reviewed-on: https://chromium-review.googlesource.com/559754
Reviewed-by: Biao She <bshe@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484920}
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/db92e6b421f4d3e40a01a00a0fc77b9ad2fe13af/device/vr/android/gvr/gvr_delegate.h

Status: Fixed (was: Started)
Components: Blink>WebXR

Sign in to add a comment