WebVR: Use content CVC size for compositor rendering

Desktop / Chromium - klausw [chromium.org] - 17 November 2016 02:30 UTC

We can't currently resize the content window used by the compositor rendering path, so we must use its dimensions for the WebVR API reported render sizes.

It includes a rather nasty hack to override canvas size to 100% if it was manually set to something different. This works around three.js examples not rendering right, apparently a fullscreened canvas just gets centered if it explicitly sets a size smaller than the fullscreen dimensions.

BUG=389343,655722

Review-Url: https://codereview.chromium.org/2508703002 Cr-Commit-Position: refs/heads/master@{#432811}

4026d56 WebVR: Use content CVC size for compositor rendering
chrome/browser/android/vr_shell/vr_shell.cc | 169 ++++++++++++++++----
chrome/browser/android/vr_shell/vr_shell.h | 15 +-
.../browser/android/vr_shell/vr_shell_delegate.cc | 3 +
device/vr/android/gvr/gvr_delegate.h | 4 +
device/vr/android/gvr/gvr_device.cc | 21 ++-
third_party/WebKit/Source/modules/vr/VRDisplay.cpp | 47 +++++-
third_party/WebKit/Source/modules/vr/VRDisplay.h | 2 +
7 files changed, 218 insertions(+), 43 deletions(-)

Upstream: git.chromium.org


  • Share