Commit a5115083 authored by Klaus Weidner's avatar Klaus Weidner Committed by Commit Bot

Reuse surfaceless GPU connection when re-entering WebVR

https://crrev.com/c/1120677 "Don't create a Surface for WebXR SharedBuffer
mode" had a logic error that led to the GPU process connection being recreated
unconditionally on re-entering VR, resulting in an inconsistent state where it
tried to reuse mailbox names belonging to the previous connection.

Change-Id: Ic005c7884a46b3d1b3da986a55e9d733f09d68d3
Reviewed-on: https://chromium-review.googlesource.com/1125273Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572390}
parent 0f9ea81e
...@@ -859,7 +859,11 @@ void VrShellGl::ConnectPresentingService( ...@@ -859,7 +859,11 @@ void VrShellGl::ConnectPresentingService(
GetWebVrFrameTransportOptions(options); GetWebVrFrameTransportOptions(options);
if (webxr_use_shared_buffer_draw_) { if (webxr_use_shared_buffer_draw_) {
CreateSurfaceBridge(nullptr); // Create the mailbox bridge if it doesn't exist yet. We can continue
// reusing the existing one if it does, its resources such as mailboxes
// are still valid.
if (!mailbox_bridge_)
CreateSurfaceBridge(nullptr);
} else { } else {
if (!webvr_surface_texture_) { if (!webvr_surface_texture_) {
webvr_surface_texture_ = gl::SurfaceTexture::Create(webvr_texture_id_); webvr_surface_texture_ = gl::SurfaceTexture::Create(webvr_texture_id_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment