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

Issue 2848483003: WebVR: fix initial vsync (Closed)

Created:
3 years, 7 months ago by klausw
Modified:
3 years, 7 months ago
Reviewers:
mthiesse, bajones
CC:
chromium-reviews, haraken, blink-reviews, feature-vr-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WebVR: fix initial vsync Applications sometimes use window.rAF while not presenting, then switch to vrDisplay.rAF after presentation starts. Depending on the animation loop's timing, this can cause a race condition where presentation has been started but there's no vrDisplay.rAF pending yet. Ensure there's at least vsync being processed after presentation starts so that a queued window.rAF can run and schedule a vrDisplay.rAF. BUG=711789 Review-Url: https://codereview.chromium.org/2848483003 Cr-Commit-Position: refs/heads/master@{#468167} Committed: https://chromium.googlesource.com/chromium/src/+/262e77a72493e36e8006aeeba1c7497a42ee5ad9

Patch Set 1 #

Total comments: 5

Patch Set 2 : move iframe focus to separate patch #

Patch Set 3 : Logging fixes as suggested. #

Total comments: 3

Patch Set 4 : Use simple scheduling call instead of initializing vsync. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -8 lines) Patch
M third_party/WebKit/Source/modules/vr/VRDisplay.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.cpp View 1 2 3 11 chunks +51 lines, -7 lines 2 comments Download

Messages

Total messages: 28 (10 generated)
klausw
3 years, 7 months ago (2017-04-27 21:36:57 UTC) #2
mthiesse
Can you split this up into two CLs please?
3 years, 7 months ago (2017-04-27 21:53:22 UTC) #3
bajones
LGTM, but I have some nits on a couple of your console messages https://codereview.chromium.org/2848483003/diff/1/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File ...
3 years, 7 months ago (2017-04-27 22:02:46 UTC) #4
mthiesse
To be clear, not lgtm, this contains subtle fixes for two different issues that should ...
3 years, 7 months ago (2017-04-27 22:10:48 UTC) #5
bajones
On 2017/04/27 22:10:48, mthiesse wrote: > To be clear, not lgtm, this contains subtle fixes ...
3 years, 7 months ago (2017-04-27 22:14:14 UTC) #6
bsheedy
Posting this here so that I don't forget/miss the split CLs: We should add tests ...
3 years, 7 months ago (2017-04-27 23:01:05 UTC) #7
klausw
PTAL. The iframe focus patch is now in crrev.com/2847233002 as an independent patch, they can ...
3 years, 7 months ago (2017-04-28 18:43:14 UTC) #9
klausw
https://codereview.chromium.org/2848483003/diff/1/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/1/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode771 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:771: "VRDisplay.requestAnimationFrame not called, presentation is broken.")); On 2017/04/28 18:43:14, ...
3 years, 7 months ago (2017-04-28 18:45:08 UTC) #12
mthiesse
https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode413 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:413: // uses window.rAF while not yet presenting. It needs ...
3 years, 7 months ago (2017-04-28 19:13:21 UTC) #13
mthiesse
https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode407 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:407: // TODO(klausw,crbug.com/710863): there appear to be cases where an ...
3 years, 7 months ago (2017-04-28 19:45:06 UTC) #14
klausw
PTAL. https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode413 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:413: // uses window.rAF while not yet presenting. It ...
3 years, 7 months ago (2017-04-28 20:23:02 UTC) #15
bajones
LGTM again, thanks! You'll need to wait for @mthiesse to approve though, to clear his ...
3 years, 7 months ago (2017-04-28 20:28:20 UTC) #16
mthiesse
lgtm https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode735 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:735: if (pending_vrdisplay_raf_ && scripted_animation_controller_) { nit: Checking pending_vrdisplay_raf_ ...
3 years, 7 months ago (2017-04-28 20:35:40 UTC) #19
klausw
https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode735 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:735: if (pending_vrdisplay_raf_ && scripted_animation_controller_) { On 2017/04/28 20:35:39, mthiesse ...
3 years, 7 months ago (2017-04-28 21:10:17 UTC) #20
mthiesse
On 2017/04/28 21:10:17, klausw wrote: > https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp > File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): > > https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode735 > ...
3 years, 7 months ago (2017-04-28 21:15:27 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848483003/60001
3 years, 7 months ago (2017-04-28 21:45:28 UTC) #24
klausw
On 2017/04/28 21:15:27, mthiesse wrote: > On 2017/04/28 21:10:17, klausw wrote: > > > https://codereview.chromium.org/2848483003/diff/60001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp ...
3 years, 7 months ago (2017-04-28 21:45:33 UTC) #25
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 22:53:09 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/262e77a72493e36e8006aeeba1c7...

Powered by Google App Engine
This is Rietveld 408576698