New issue
Advanced search Search tips

Issue 698643 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR

Blocking:
issue 655722



Sign in to add a comment

WebVR: bypass compositor via mailbox copy

Project Member Reported by klausw@chromium.org, Mar 6 2017

Issue description

(Forked from  issue 655722  to track M58 work)

TL;DR: activate a short-circuited render path for WebVR presentation mode.

Currently, WebVR rendering on Android goes through the normal compositor path, using a hack to fullscreen the source canvas. This has high latency due to compositor buffering. Also, correctly associating poses with frame content for reprojection required reading back pixel data to get a frame ID from the image, this is a slow operation that further increased latency.

Also, there are various spec compliance issues and bugs related to the fullscreen hack, for example resizing the source canvas does not work well. Any resolution other than the physical display dimensions will be inefficient and poorly scaled, and the resolution is too high for mobile WebVR in this mode.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 8 2017

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

commit 003796caeb8de246a1d5719f439f25f26ca7f4f1
Author: khushalsagar <khushalsagar@chromium.org>
Date: Wed Mar 08 01:28:29 2017

content: Add public context creation API.

The change adds a hook to public content/ API for an embedder to create
a GL context for a given gpu surface.

BUG= 698643 

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

[modify] https://crrev.com/003796caeb8de246a1d5719f439f25f26ca7f4f1/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/003796caeb8de246a1d5719f439f25f26ca7f4f1/content/public/browser/android/compositor.h

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 8 2017

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

commit 6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74
Author: klausw <klausw@chromium.org>
Date: Wed Mar 08 23:26:05 2017

WebVR compositor bypass via BrowserMain context + mailbox

Implement compositor bypass for WebVR via mailbox copy:

- Create a GPU command buffer GL context in the VrShellGl thread that's
  backed by a native Surface. This is encapsulated inside the new
  MailboxToSurfaceBridge class.

- WebKit's VRDisplay sends a MailboxHolder for each frame (as drawn
  via WebGL on the GPU process) as argument to the SubmitFrame mojo
  call.

- MailboxToSurfaceLayerBridge uses its GPU command buffer GL context
  to draw the mailbox content to a Surface.

- VrShellGl picks up the frame from the corresponding SurfaceTexture
  and  proceeds with rendering as usual with its native GL context
  as needed for the low-level GVR API.

Also implements on-the-fly canvas resizing, the transfer surface and
GVR renderbuffer are resized as needed to match the source canvas.

Added frame number as an argument to various TRACE_EVENTs for timing
analysis.

It includes two separate modes for frame scheduling, the more
aggressive one is conditional on
chrome:://flags#enable-webvr-experimental-rendering since the
framerate seems a bit less stable.

BUG= 698643 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

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

[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/BUILD.gn
[add] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[add] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/chrome/browser/android/vr_shell/vr_shell_renderer.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/BUILD.gn
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/DEPS
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/android/gvr/gvr_delegate.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_device.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_device.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_display_impl.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_display_impl.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/device/vr/vr_service.mojom
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/gpu/ipc/common/mailbox_holder.typemap
[add] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/gpu/ipc/common/mailbox_holder_for_blink.typemap
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74/third_party/WebKit/public/blink_typemaps.gni

Comment 3 Deleted

Project Member

Comment 4 by sheriffbot@chromium.org, Mar 8 2017

Labels: -Merge-Request-58 Merge-Review-58 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), bhthompson@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Merge requested for both linked changes together, r455592 depends on r455324.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 9 2017

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

commit 1d11ee282df65fd3558840de0cde9f86aa556fe0
Author: sammc <sammc@chromium.org>
Date: Thu Mar 09 03:11:35 2017

Revert of WebVR compositor bypass via BrowserMain context + mailbox (patchset #32 id:610001 of https://codereview.chromium.org/2729523002/ )

Reason for revert:
Speculative revert for several failing vr layout tests:
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Mac10.11/17274
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Mac10.11%20%28retina%29/13252
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Mac10.10/31124
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Mac10.9/43536
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Win7/50908
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Win10/20452

Original issue's description:
> WebVR compositor bypass via BrowserMain context + mailbox
>
> Implement compositor bypass for WebVR via mailbox copy:
>
> - Create a GPU command buffer GL context in the VrShellGl thread that's
>   backed by a native Surface. This is encapsulated inside the new
>   MailboxToSurfaceBridge class.
>
> - WebKit's VRDisplay sends a MailboxHolder for each frame (as drawn
>   via WebGL on the GPU process) as argument to the SubmitFrame mojo
>   call.
>
> - MailboxToSurfaceLayerBridge uses its GPU command buffer GL context
>   to draw the mailbox content to a Surface.
>
> - VrShellGl picks up the frame from the corresponding SurfaceTexture
>   and  proceeds with rendering as usual with its native GL context
>   as needed for the low-level GVR API.
>
> Also implements on-the-fly canvas resizing, the transfer surface and
> GVR renderbuffer are resized as needed to match the source canvas.
>
> Added frame number as an argument to various TRACE_EVENTs for timing
> analysis.
>
> It includes two separate modes for frame scheduling, the more
> aggressive one is conditional on
> chrome:://flags#enable-webvr-experimental-rendering since the
> framerate seems a bit less stable.
>
> BUG= 698643 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
>
> Review-Url: https://codereview.chromium.org/2729523002
> Cr-Commit-Position: refs/heads/master@{#455592}
> Committed: https://chromium.googlesource.com/chromium/src/+/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74

TBR=mthiesse@chromium.org,bajones@chromium.org,khushalsagar@chromium.org,dcheng@chromium.org,piman@chromium.org,klausw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 698643 

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

[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/BUILD.gn
[delete] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[delete] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/chrome/browser/android/vr_shell/vr_shell_renderer.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/BUILD.gn
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/DEPS
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/android/gvr/gvr_delegate.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_device.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_device.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_display_impl.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_display_impl.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/device/vr/vr_service.mojom
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/gpu/ipc/common/mailbox_holder.typemap
[delete] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/gpu/ipc/common/mailbox_holder_for_blink.typemap
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/1d11ee282df65fd3558840de0cde9f86aa556fe0/third_party/WebKit/public/blink_typemaps.gni

Labels: -Merge-Review-58 Merge-Rejected-58
There are a few things wrong here:
 - Merge was requested without letting it bake on trunk (which appears to have been necessary given the revert)
 - This change is HUGE, why are we implementing new functionality and trying to merge it back to a branch?

This should wait for M59, merge rejected.
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 10 2017

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

commit 9f86464794416e81abfe5921e9fac892716c610b
Author: klausw <klausw@chromium.org>
Date: Fri Mar 10 19:22:48 2017

Re-land WebVR compositor bypass via BrowserMain context + mailbox

Implement compositor bypass for WebVR via mailbox copy:

- Create a GPU command buffer GL context in the VrShellGl thread that's
  backed by a native Surface. This is encapsulated inside the new
  MailboxToSurfaceBridge class.

- WebKit's VRDisplay sends a MailboxHolder for each frame (as drawn
  via WebGL on the GPU process) as argument to the SubmitFrame mojo
  call.

- MailboxToSurfaceLayerBridge uses its GPU command buffer GL context
  to draw the mailbox content to a Surface.

- VrShellGl picks up the frame from the corresponding SurfaceTexture
  and  proceeds with rendering as usual with its native GL context
  as needed for the low-level GVR API.

Also implements on-the-fly canvas resizing, the transfer surface and
GVR renderbuffer are resized as needed to match the source canvas.

Added frame number as an argument to various TRACE_EVENTs for timing
analysis.

It includes two separate modes for frame scheduling, the more
aggressive one is conditional on
chrome:://flags#enable-webvr-experimental-rendering since the
framerate seems a bit less stable.

BUG= 698643 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2729523002
Cr-Original-Commit-Position: refs/heads/master@{#455592}
Committed: https://chromium.googlesource.com/chromium/src/+/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74
Review-Url: https://codereview.chromium.org/2729523002
Cr-Commit-Position: refs/heads/master@{#456130}

[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/BUILD.gn
[add] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[add] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/chrome/browser/android/vr_shell/vr_shell_renderer.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/BUILD.gn
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/DEPS
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/android/gvr/gvr_delegate.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_device.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_device.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_display_impl.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_display_impl.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/device/vr/vr_service.mojom
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/gpu/ipc/common/mailbox_holder.typemap
[add] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/gpu/ipc/common/mailbox_holder_for_blink.typemap
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/9f86464794416e81abfe5921e9fac892716c610b/third_party/WebKit/public/blink_typemaps.gni

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 10 2017

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

commit 587f430144e9a2ad778649dff1c297b09977c2a3
Author: klausw <klausw@chromium.org>
Date: Fri Mar 10 21:15:47 2017

Revert of Re-land WebVR compositor bypass via BrowserMain context + mailbox (patchset #37 id:710001 of https://codereview.chromium.org/2729523002/ )

Reason for revert:
Layout tests still failing for mac and windows despite passing on the trybots. Example: https://build.chromium.org/p/chromium.webkit/buildstatus?builder=WebKit%20Mac10.9&number=43627

Original issue's description:
> Re-land WebVR compositor bypass via BrowserMain context + mailbox
>
> Implement compositor bypass for WebVR via mailbox copy:
>
> - Create a GPU command buffer GL context in the VrShellGl thread that's
>   backed by a native Surface. This is encapsulated inside the new
>   MailboxToSurfaceBridge class.
>
> - WebKit's VRDisplay sends a MailboxHolder for each frame (as drawn
>   via WebGL on the GPU process) as argument to the SubmitFrame mojo
>   call.
>
> - MailboxToSurfaceLayerBridge uses its GPU command buffer GL context
>   to draw the mailbox content to a Surface.
>
> - VrShellGl picks up the frame from the corresponding SurfaceTexture
>   and  proceeds with rendering as usual with its native GL context
>   as needed for the low-level GVR API.
>
> Also implements on-the-fly canvas resizing, the transfer surface and
> GVR renderbuffer are resized as needed to match the source canvas.
>
> Added frame number as an argument to various TRACE_EVENTs for timing
> analysis.
>
> It includes two separate modes for frame scheduling, the more
> aggressive one is conditional on
> chrome:://flags#enable-webvr-experimental-rendering since the
> framerate seems a bit less stable.
>
> BUG= 698643 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
>
> Review-Url: https://codereview.chromium.org/2729523002
> Cr-Original-Commit-Position: refs/heads/master@{#455592}
> Committed: https://chromium.googlesource.com/chromium/src/+/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74
> Review-Url: https://codereview.chromium.org/2729523002
> Cr-Commit-Position: refs/heads/master@{#456130}
> Committed: https://chromium.googlesource.com/chromium/src/+/9f86464794416e81abfe5921e9fac892716c610b

TBR=mthiesse@chromium.org,bajones@chromium.org,khushalsagar@chromium.org,dcheng@chromium.org,piman@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 698643 

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

[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/BUILD.gn
[delete] https://crrev.com/203654f1cb443b997c58dfda0dbb8e11d7222f97/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[delete] https://crrev.com/203654f1cb443b997c58dfda0dbb8e11d7222f97/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/chrome/browser/android/vr_shell/vr_shell_renderer.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/BUILD.gn
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/DEPS
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/android/gvr/gvr_delegate.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_device.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_device.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_display_impl.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_display_impl.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/device/vr/vr_service.mojom
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/gpu/ipc/common/mailbox_holder.typemap
[delete] https://crrev.com/203654f1cb443b997c58dfda0dbb8e11d7222f97/gpu/ipc/common/mailbox_holder_for_blink.typemap
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/587f430144e9a2ad778649dff1c297b09977c2a3/third_party/WebKit/public/blink_typemaps.gni

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 11 2017

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

commit 362c621af1b1c9ad8da5bac607a082108b4aa213
Author: klausw <klausw@chromium.org>
Date: Sat Mar 11 03:37:13 2017

Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox

[Cause for the layout test failures was likely a missing export that
causes mailbox_holder.mojom.js to get lost when packaging/extracting
in swarming builds.

bsheedy@'s https://chromium-review.googlesource.com/c/453099/ should
fix that, trying again.]

Implement compositor bypass for WebVR via mailbox copy:

- Create a GPU command buffer GL context in the VrShellGl thread that's
  backed by a native Surface. This is encapsulated inside the new
  MailboxToSurfaceBridge class.

- WebKit's VRDisplay sends a MailboxHolder for each frame (as drawn
  via WebGL on the GPU process) as argument to the SubmitFrame mojo
  call.

- MailboxToSurfaceLayerBridge uses its GPU command buffer GL context
  to draw the mailbox content to a Surface.

- VrShellGl picks up the frame from the corresponding SurfaceTexture
  and  proceeds with rendering as usual with its native GL context
  as needed for the low-level GVR API.

Also implements on-the-fly canvas resizing, the transfer surface and
GVR renderbuffer are resized as needed to match the source canvas.

Added frame number as an argument to various TRACE_EVENTs for timing
analysis.

It includes two separate modes for frame scheduling, the more
aggressive one is conditional on
chrome:://flags#enable-webvr-experimental-rendering since the
framerate seems a bit less stable.

BUG= 698643 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2729523002
Cr-Original-Original-Commit-Position: refs/heads/master@{#455592}
Committed: https://chromium.googlesource.com/chromium/src/+/6280ec5b6e3b4c307926eb1bf0167acc2a0d4a74
Review-Url: https://codereview.chromium.org/2729523002
Cr-Original-Commit-Position: refs/heads/master@{#456130}
Committed: https://chromium.googlesource.com/chromium/src/+/9f86464794416e81abfe5921e9fac892716c610b
Review-Url: https://codereview.chromium.org/2729523002
Cr-Commit-Position: refs/heads/master@{#456272}

[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/BUILD.gn
[add] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
[add] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/chrome/browser/android/vr_shell/vr_shell_renderer.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/BUILD.gn
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/DEPS
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/android/gvr/gvr_delegate.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_device.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_device.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_display_impl.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_display_impl.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/device/vr/vr_service.mojom
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/gpu/ipc/common/mailbox_holder.typemap
[add] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/gpu/ipc/common/mailbox_holder_for_blink.typemap
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/362c621af1b1c9ad8da5bac607a082108b4aa213/third_party/WebKit/public/blink_typemaps.gni

The WebKit layout tests passed this time. For more details see  issue 700577  - in short, tests work fine in local testing or on trybots, but fail in the post-commit tests because packaging/extracting loses files.
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 13 2017

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

commit 35940a6d7e30f4aa3de61eb5dc6a3caace1a1482
Author: klausw <klausw@chromium.org>
Date: Mon Mar 13 22:58:45 2017

Apply sanity check for accelerated rendering unconditionally.

We want this check in production builds also, not just debug.

BUG= 698643 

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

[modify] https://crrev.com/35940a6d7e30f4aa3de61eb5dc6a3caace1a1482/third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Labels: -M-58 M-59
Status: Fixed (was: Started)
Bumping to M59, and marking fixed since the code has landed and is available in Chrome Canary. Further followups will be tracked in separate bugs.
Components: Blink>WebXR

Sign in to add a comment