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

Issue 2544713002: WebVR: avoid race conditions for partially-initialized display (Closed)

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

Description

WebVR: avoid race conditions for partially-initialized display The GvrNonPresentingDelegate was acting as a pseudo VRDisplay device and reporting successful requestPresent even though vital information such as render resolution is not available yet. Instead of the "fallback" 2048x1024 resolution, report a 0x0 resolution so that other code can recognize this as an invalid device and defer actions such as resizing. One specific issue was that a vrpresentchange was getting fired prematurely, leading to wrong canvas sizing by the JS application. BUG=667327 Committed: https://crrev.com/772bdaaac52114f3ebbc7626a3c630a3918b03d0 Cr-Commit-Position: refs/heads/master@{#435824}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use existing constant instead of 0, 0 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -11 lines) Patch
M chrome/browser/android/vr_shell/vr_shell.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_delegate.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/vr/android/gvr/gvr_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M device/vr/android/gvr/gvr_device.cc View 1 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.cpp View 5 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 12 (4 generated)
klausw
4 years ago (2016-12-01 21:12:59 UTC) #2
mthiesse
https://codereview.chromium.org/2544713002/diff/1/device/vr/android/gvr/gvr_device.cc File device/vr/android/gvr/gvr_device.cc (right): https://codereview.chromium.org/2544713002/diff/1/device/vr/android/gvr/gvr_device.cc#newcode94 device/vr/android/gvr/gvr_device.cc:94: delegate_->SetWebVRRenderSurfaceSize(0, 0); nit: use constant https://codereview.chromium.org/2544713002/diff/1/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): ...
4 years ago (2016-12-01 21:46:57 UTC) #3
klausw
PTAL https://codereview.chromium.org/2544713002/diff/1/device/vr/android/gvr/gvr_device.cc File device/vr/android/gvr/gvr_device.cc (right): https://codereview.chromium.org/2544713002/diff/1/device/vr/android/gvr/gvr_device.cc#newcode94 device/vr/android/gvr/gvr_device.cc:94: delegate_->SetWebVRRenderSurfaceSize(0, 0); On 2016/12/01 21:46:57, mthiesse wrote: > ...
4 years ago (2016-12-01 23:08:56 UTC) #4
mthiesse
lgtm
4 years ago (2016-12-01 23:16:56 UTC) #5
bajones
On 2016/12/01 23:16:56, mthiesse wrote: > lgtm LGTM as a short term fix. We definitely ...
4 years ago (2016-12-01 23:42:28 UTC) #6
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/2544713002/20001
4 years ago (2016-12-02 00:04:51 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-02 02:11:57 UTC) #10
commit-bot: I haz the power
4 years ago (2016-12-02 02:16:02 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/772bdaaac52114f3ebbc7626a3c630a3918b03d0
Cr-Commit-Position: refs/heads/master@{#435824}

Powered by Google App Engine
This is Rietveld 408576698