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

Issue 2738683002: WebVR compositor bypass via BrowserMain context + mailbox (Closed)

Created:
3 years, 9 months ago by dcheng
Modified:
3 years, 9 months ago
Reviewers:
klausw
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, blink-reviews, dglazkov+blink, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, feature-vr-reviews_chromium.org, haraken, piman+watch_chromium.org, darin (slow to review), blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 - SubmitFrame creates a mailbox and sends it as part of the mojo call - On SubmitFrame, the GPU command buffer GL context converts the mailbox to a texture, and draws the content to the native Surface - VrShellGl picks up the frame from the corresponding SurfaceTexture and proceeds with rendering as usual 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 patch from issue 2729523002 at patchset 390001 (http://crrev.com/2729523002#ps390001)

Patch Set 1 #

Patch Set 2 : Dubious fix #

Patch Set 3 : Less hacked up version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+943 lines, -281 lines) Patch
M chrome/browser/android/vr_shell/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h View 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.h View 4 chunks +16 lines, -3 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.cc View 4 chunks +50 lines, -6 lines 0 comments Download
A chrome/browser/android/vr_shell/vr_shell_command_buffer_gl.h View 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/android/vr_shell/vr_shell_command_buffer_gl.cc View 1 chunk +141 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_gl.h View 9 chunks +34 lines, -7 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell_gl.cc View 18 chunks +172 lines, -82 lines 0 comments Download
A chrome/browser/android/vr_shell/vr_shell_gpu_renderer.h View 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/browser/android/vr_shell/vr_shell_gpu_renderer.cc View 1 chunk +194 lines, -0 lines 0 comments Download
M device/vr/BUILD.gn View 2 2 chunks +2 lines, -0 lines 0 comments Download
M device/vr/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M device/vr/android/gvr/gvr_delegate.h View 1 chunk +5 lines, -2 lines 0 comments Download
M device/vr/android/gvr/gvr_device.h View 1 chunk +6 lines, -2 lines 0 comments Download
M device/vr/android/gvr/gvr_device.cc View 2 chunks +11 lines, -5 lines 0 comments Download
M device/vr/test/fake_vr_device.h View 1 chunk +6 lines, -2 lines 0 comments Download
M device/vr/test/fake_vr_device.cc View 1 chunk +9 lines, -2 lines 0 comments Download
M device/vr/vr_device.h View 1 chunk +6 lines, -2 lines 0 comments Download
M device/vr/vr_display_impl.h View 1 chunk +6 lines, -2 lines 0 comments Download
M device/vr/vr_display_impl.cc View 1 chunk +9 lines, -4 lines 0 comments Download
M device/vr/vr_service.mojom View 2 chunks +11 lines, -2 lines 0 comments Download
M gpu/ipc/common/mailbox_holder.typemap View 1 chunk +4 lines, -0 lines 0 comments Download
A + gpu/ipc/common/mailbox_holder_for_blink.typemap View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.h View 4 chunks +19 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.cpp View 12 chunks +121 lines, -150 lines 0 comments Download
M third_party/WebKit/public/blink_typemaps.gni View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 7 (2 generated)
dcheng
Dubious fix that gets the component build further. Now it fails with: obj/chrome/browser/android/vr_shell/libvr_common.a(vr_shell_command_buffer_gl.o):vr_shell_command_buffer_gl.cc:function vr_shell::VrShellCommandBufferGl::OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost>): error: ...
3 years, 9 months ago (2017-03-07 10:00:04 UTC) #2
mthiesse
Thanks dcheng! @klaus This now compiles on component build when you add "//services/ui/public/cpp/gpu" to chrome/browser/android/vr_shell:vr_common
3 years, 9 months ago (2017-03-07 15:43:01 UTC) #3
dcheng
Here's a version that should be officially blessed and less hacky.
3 years, 9 months ago (2017-03-07 19:32:53 UTC) #4
klausw
Thank you very much! Merged as of PS23 into my https://codereview.chromium.org/2729523002, PTAL at that one ...
3 years, 9 months ago (2017-03-07 20:38:59 UTC) #5
klausw
3 years, 9 months ago (2017-03-07 20:45:05 UTC) #6
Thank you very much! Merged as of PS23 into my
https://codereview.chromium.org/2729523002, PTAL at that one for the
mojo/IPC changes. (I removed the FrameView.cpp change.)

On Tue, Mar 7, 2017 at 11:32 AM, <dcheng@chromium.org> wrote:

> Here's a version that should be officially blessed and less hacky.
>
> https://codereview.chromium.org/2738683002/
>

-- 
You received this message because you are subscribed to the Google Groups "Blink
Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to blink-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698