New issue
Advanced search Search tips

Issue 761436 link

Starred by 5 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR

Blocked on:
issue 761432
issue 761462



Sign in to add a comment

WebVR: remove pixel copies from Android render pipeline

Project Member Reported by klausw@chromium.org, Sep 1 2017

Issue description

Currently, WebVR per-frame rendering works something like this:

- Renderer process uses its command buffer GL interface to issue WebGL drawing commands to the GPU process

- GPU process executes drawing commands, canvas drawing destination is a framebuffer object (FBO)

- GPU process converts FBO to a texture mailbox + sync token

- Renderer process passes mailbox + sync token to Browser process

- Browser process uses its command buffer GL interface (in MailboxToSurfaceBridge) to send copy-to-Surface commands

- GPU process copies the texture referred to by the mailbox to a Surface

- Browser process receives an OnFrameAvailable event for the SurfaceTexture (GLConsumer) corresponding to the Surface

- Browser process (VrShellGl::DrawFrame) uses a local GL context to copy the SurfaceTexture into a GVR-provided FBO.

- Browser process submits the frame to GVR.

- GVR queues the frame, and later uses async reprojection to apply lens distortion correction while copying it to the screen.

This involves two explicit 1:1 pixel copies, plus the distort+draw step from async reprojection. The first two copies are redundant work and should be avoided.

The original plan for avoiding the first copy was to have the GPU process's GL context render WebVR content directly onto a custom Surface. See issue 655733 "WebVR mobile: render directly to the surface that we want". This is blocked on synchronization issues - drawing to a custom Surface is incompatible with virtualized contexts, and we have to use virtualized contexts on Qualcomm chipsets to avoid severe tearing for non-VR WebGL applications.

New plan is to use AHardwareBuffer-backed GPUMemoryBuffer objects instead of the Surface/SurfaceTexture pair, see  issue 761432 .
 
For completeness, there's one additional copy in the mailbox-backed rendering path if a multisampled FBO has to be resolved to a non-multisampled render target. This is an explicit copy step in some cases (see  issue 700031  where this was not working correctly), or can happen implicitly (and hopefully more efficiently) if the GPU can do this internally when finalizing drawing. 

This extra copy was fixed by r492707 ( issue 750286 ). I've confirmed this by intentionally breaking CopyTextureCHROMIUM (setting color.b = 0.0 in gles2_cmd_copy_texture_chromium.cc:433), this has no effect with the fix included and turns WebVR presentation yellow when I revert r492707. That implies that the current render path no longer uses CopyTextureCHROMIUM, at least on hardware supporting implicit multisample resolve.
Blockedon: 761432
Components: Blink>WebVR
Labels: Proj-VR
Owner: klausw@chromium.org
Blockedon: 761462

Comment 5 by xing...@intel.com, Sep 4 2017

Cc: xing...@intel.com
Status: Assigned (was: Untriaged)

Comment 7 by klausw@chromium.org, Sep 25 2017

Labels: -M-63 M-64
Labels: -M-64 M-65
AHardwareBuffer-backed GpuMemoryBuffer and GpuFence for synchronization are now available in Chrome (see  issue 761432 ), this bug will track the next steps in using these for WebVR.
Status: Started (was: Assigned)
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 4 2018

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

commit f0d872f0a3ccd1109c5d92ae9b106c99289359ba
Author: Klaus Weidner <klausw@chromium.org>
Date: Thu Jan 04 17:10:26 2018

Use GpuFence for WebVR frame synchronization

Currently controlled via "WebVR experimental rendering" feature flag.

When active, it replaces the GLFence ClientWait that was used to ensure frames
are fully rendered before submitting them to GVR. Instead, it submits
incomplete frames to GVR, with a GpuFence ensuring the next frame's GL commands
get in line behind the current frame. It uses heuristics to detect too-slow or
too-fast submission.

Also replace the Blink-side WaitPrevStrategy and transfer method determination
with explicit options passed through Mojo. RequestPresent sends presentation
options (currently just preserveDrawingBuffer), and receives frame transport
options back in the RequestPresent response.

Includes replacing Bind with BindOnce at the affected code locations due to the
ongoing deprecation.

Bug: 761436
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I6709ac51c94fd840df673ad0ac34cc03786465ff
Reviewed-on: https://chromium-review.googlesource.com/790133
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527018}
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/gl_browser_interface.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_gl_thread.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_gl_thread.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell_delegate.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/vr/service/vr_display_host.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/chrome/browser/vr/service/vr_display_host.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/BUILD.gn
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/android/gvr/gvr_delegate_provider.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/openvr/openvr_device.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/openvr/openvr_device.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/openvr/openvr_render_loop.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/openvr/openvr_render_loop.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_device_base.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_device_base.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_display_impl.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_display_impl.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/device/vr/vr_service.mojom
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/f0d872f0a3ccd1109c5d92ae9b106c99289359ba/third_party/WebKit/Tools/Scripts/audit-non-blink-usage.py

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 9 2018

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

commit 804b9dfcb91c02c3a5386ab60be3e2fd6447ef88
Author: Klaus Weidner <klausw@chromium.org>
Date: Tue Jan 09 03:02:12 2018

Use new platform XRFrameTransport class for WebVR

Move the VRDisplay code that sends WebVR images to the device to a
platform-level XRFrameTransport class. This is in preparation for
sharing this code with the new modules/xr/ (WebXR) implementation,
and also removes low-level platform code from modules/vr/.

The code in XRFrameTransport is intentionally left mostly unchanged
apart from moving to simplify the refactor. Structural changes such as
splitting out helper methods are planned for a followup.

Bug: 761436

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I58df19f903e433333f41d602d3352c92e3905029
Reviewed-on: https://chromium-review.googlesource.com/828407
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527882}
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/modules/vr/DEPS
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/modules/vr/VRDisplay.h
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/platform/graphics/gpu/DEPS
[add] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/platform/graphics/gpu/XRFrameTransport.cpp
[add] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Source/platform/graphics/gpu/XRFrameTransport.h
[modify] https://crrev.com/804b9dfcb91c02c3a5386ab60be3e2fd6447ef88/third_party/WebKit/Tools/Scripts/audit-non-blink-usage.py

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 18 2018

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

commit bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f
Author: Klaus Weidner <klausw@chromium.org>
Date: Thu Jan 18 03:19:51 2018

Add webxr-render-path feature + param

Add a new flag to allow selecting the preferred WebXR render path on Android,
in preparation for adding additional options in followups. The specific
path is selected through a string-valued feature parameter.

This replaces the the webvr-experimental-rendering feature flag and
corresponding Blink-side WebVRExperimentalRendering flag passthrough.

Since the rendering path can now be configured via requestPresent mojo
response options, there's no need to pass the new feature flag through
to the Renderer.

Bug: 761436
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: Iab39bd9aa04e1748e359be426eafb0f7b88ddffe
Reviewed-on: https://chromium-review.googlesource.com/841105
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530039}
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/about_flags.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/android/vr_shell/vr_metrics_util.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/android/vr_shell/vr_metrics_util.h
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/content/child/runtime_features.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/content/public/common/content_features.cc
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/content/public/common/content_features.h
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f/tools/metrics/histograms/histograms.xml

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 18 2018

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

commit e32b64a12b0248c4beb8e519b9b1055fbb09f765
Author: John Budorick <jbudorick@chromium.org>
Date: Thu Jan 18 14:16:06 2018

Revert "Add webxr-render-path feature + param"

This reverts commit bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f.

Reason for revert: Breaks x86 and x64 compilation: https://ci.chromium.org/buildbot/chromium.android/Android%20x86%20Builder%20%28dbg%29/26350

Original change's description:
> Add webxr-render-path feature + param
> 
> Add a new flag to allow selecting the preferred WebXR render path on Android,
> in preparation for adding additional options in followups. The specific
> path is selected through a string-valued feature parameter.
> 
> This replaces the the webvr-experimental-rendering feature flag and
> corresponding Blink-side WebVRExperimentalRendering flag passthrough.
> 
> Since the rendering path can now be configured via requestPresent mojo
> response options, there's no need to pass the new feature flag through
> to the Renderer.
> 
> Bug: 761436
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
> Change-Id: Iab39bd9aa04e1748e359be426eafb0f7b88ddffe
> Reviewed-on: https://chromium-review.googlesource.com/841105
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
> Reviewed-by: Brandon Jones <bajones@chromium.org>
> Commit-Queue: Klaus Weidner <klausw@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#530039}

TBR=ddorwin@chromium.org,vollick@chromium.org,rkaplow@chromium.org,bajones@chromium.org,pfeldman@chromium.org,klausw@chromium.org

Change-Id: I98ca963584fa5a5a293ec072f9c7694c6141b236
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 761436
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Reviewed-on: https://chromium-review.googlesource.com/873552
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530136}
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/about_flags.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/android/vr_shell/vr_metrics_util.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/android/vr_shell/vr_metrics_util.h
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/content/child/runtime_features.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/content/public/common/content_features.cc
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/content/public/common/content_features.h
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/e32b64a12b0248c4beb8e519b9b1055fbb09f765/tools/metrics/histograms/histograms.xml

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 18 2018

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

commit aaf697fb3586b0062abe2f98f4715c2050615b3c
Author: Klaus Weidner <klausw@chromium.org>
Date: Thu Jan 18 20:07:36 2018

Reland "Add webxr-render-path feature + param"

This is a reland of bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f,
with added BUILDFLAG(ENABLE_VR) condition to fix an unused
variable warning on Android x86/x64 where OS_ANDROID is
true but ENABLE_VR is currently false by default.

Original change's description:
> Add webxr-render-path feature + param
>
> Add a new flag to allow selecting the preferred WebXR render path on Android,
> in preparation for adding additional options in followups. The specific
> path is selected through a string-valued feature parameter.
>
> This replaces the the webvr-experimental-rendering feature flag and
> corresponding Blink-side WebVRExperimentalRendering flag passthrough.
>
> Since the rendering path can now be configured via requestPresent mojo
> response options, there's no need to pass the new feature flag through
> to the Renderer.
>
> Bug: 761436
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
> Change-Id: Iab39bd9aa04e1748e359be426eafb0f7b88ddffe
> Reviewed-on: https://chromium-review.googlesource.com/841105
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
> Reviewed-by: Brandon Jones <bajones@chromium.org>
> Commit-Queue: Klaus Weidner <klausw@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#530039}

TBR=pfeldman@chromium.org,asvitkine@chromium.org

Bug: 761436
Change-Id: Ibd86d99b793b9b474ee9d9c0597091b2eb034358
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Reviewed-on: https://chromium-review.googlesource.com/874130
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530247}
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/about_flags.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/android/vr_shell/vr_metrics_util.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/android/vr_shell/vr_metrics_util.h
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/android/vr_shell/vr_shell_gl.h
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/content/child/runtime_features.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/content/public/common/content_features.cc
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/content/public/common/content_features.h
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/aaf697fb3586b0062abe2f98f4715c2050615b3c/tools/metrics/histograms/histograms.xml

Labels: -M-65 M-66
Retargeting to M66. The prerequisites are in place now, next step is to use AHardwareBuffer backed GpuMemoryBuffer in XRFrameTransport.
FYI, https://crrev.com/c/905786 / r534865 activates an updated version of the GpuFence render path as default. While this isn't technically removing copies, it slightly improves performance (5-10%) due to better GPU utilization, so it may be of interest for people following this bug.
Labels: -M-66 M-67
Retargeting to M67. I needed a solution for sequencing work while maintaining pipelining, and the solution arrived at after discussion with piman@ (future sync tokens) isn't quite ready yet.
Project Member

Comment 19 by bugdroid1@chromium.org, Mar 29 2018

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

commit 3db61e79e472202aff089b27408870d498d235ca
Author: Klaus Weidner <klausw@chromium.org>
Date: Thu Mar 29 22:43:25 2018

Add mailbox_to_surface_bridge GpuMemoryBuffer APIs

This supports using GpuMemoryBuffer to share images between a native
GL context and a command buffer context in the GPU process.

BUG=761436

Change-Id: Iae0668e055fa1ed181bc8ff640cc290c15bb4906
Reviewed-on: https://chromium-review.googlesource.com/986663
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546995}
[modify] https://crrev.com/3db61e79e472202aff089b27408870d498d235ca/chrome/browser/android/vr/mailbox_to_surface_bridge.cc
[modify] https://crrev.com/3db61e79e472202aff089b27408870d498d235ca/chrome/browser/android/vr/mailbox_to_surface_bridge.h

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 12 2018

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

commit d25dff4da64a5e6bcea9cb30031e25eea9be827e
Author: Klaus Weidner <klausw@chromium.org>
Date: Thu Apr 12 06:56:07 2018

WebXR: implement SharedBuffer frame transport

On Android O+, avoid a pixel copy by having the XRWebGLDrawingBuffer
render directly into a mailbox texture that's supplied with the
presenting VSync. This texture is backed by a GLImage using a
GpuMemoryBuffer that's using an AndroidHardwareBuffer which is shared
with VrShellGl's native GL context.

Bug: 761436
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I487e2719f0f19f536231b8bec583340ad3d74bd1
Reviewed-on: https://chromium-review.googlesource.com/1002550
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550057}
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/about_flags.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/android/vr/metrics_util_android.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/android/vr/vr_shell_gl.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/android/vr/vr_shell_gl.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/vr/renderers/web_vr_renderer.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/vr/renderers/web_vr_renderer.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/vr/ui_element_renderer.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/chrome/browser/vr/ui_element_renderer.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/content/public/common/content_features.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/content/public/common/content_features.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/device/vr/oculus/oculus_render_loop.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/device/vr/oculus/oculus_render_loop.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/device/vr/openvr/openvr_render_loop.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/device/vr/openvr/openvr_render_loop.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/device/vr/public/mojom/vr_service.mojom
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/vr/vr_display.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/vr/vr_display.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_frame_provider.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_frame_provider.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_layer.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_layer.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_session.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_session.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_webgl_layer.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/modules/xr/xr_webgl_layer.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/platform/graphics/gpu/xr_frame_transport.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/platform/graphics/gpu/xr_frame_transport.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.cc
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.h
[modify] https://crrev.com/d25dff4da64a5e6bcea9cb30031e25eea9be827e/tools/metrics/histograms/enums.xml

Comment 21 by ericde@google.com, May 15 2018

Labels: -M-67
please update milestone when you have a target. thanks
Components: Blink>WebXR
Removing Blink>WebVR component and assigning to Blink>WebXR 
Components: -Blink>WebVR

Sign in to add a comment