Commit 17c587b1 authored by Bill Orr's avatar Bill Orr Committed by Commit Bot

Fix reenter webvr presentation on Windows after exiting.

We were getting into a state where we thought we had requested a vsync
from the device, but actually haven't.  This causes future RAFs to not
run, and we won't render.

BUG=835888

Change-Id: I41af90675fa5ba8e6b78a598594f4a2cf28217ed
Reviewed-on: https://chromium-review.googlesource.com/1028935Reviewed-by: default avatarBill Orr <billorr@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Commit-Queue: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553888}
parent bd518d42
...@@ -228,6 +228,8 @@ void OculusRenderLoop::RequestPresent( ...@@ -228,6 +228,8 @@ void OculusRenderLoop::RequestPresent(
void OculusRenderLoop::ExitPresent() { void OculusRenderLoop::ExitPresent() {
is_presenting_ = false; is_presenting_ = false;
binding_.Close();
submit_client_ = nullptr;
} }
void OculusRenderLoop::Init() {} void OculusRenderLoop::Init() {}
......
...@@ -195,6 +195,8 @@ void OpenVRRenderLoop::RequestPresent( ...@@ -195,6 +195,8 @@ void OpenVRRenderLoop::RequestPresent(
void OpenVRRenderLoop::ExitPresent() { void OpenVRRenderLoop::ExitPresent() {
is_presenting_ = false; is_presenting_ = false;
report_webxr_input_ = false; report_webxr_input_ = false;
binding_.Close();
submit_client_ = nullptr;
vr_compositor_->SuspendRendering(true); vr_compositor_->SuspendRendering(true);
} }
......
...@@ -471,6 +471,10 @@ ScriptPromise VRDisplay::requestPresent(ScriptState* script_state, ...@@ -471,6 +471,10 @@ ScriptPromise VRDisplay::requestPresent(ScriptState* script_state,
WTF::Bind(&VRDisplay::OnPresentationProviderConnectionError, WTF::Bind(&VRDisplay::OnPresentationProviderConnectionError,
WrapWeakPersistent(this))); WrapWeakPersistent(this)));
pending_present_request_ = true; pending_present_request_ = true;
// The old vr_presentation_provider_ won't be delivering any vsyncs anymore,
// so we aren't waiting on it anymore.
pending_presenting_vsync_ = false;
} else { } else {
UpdateLayerBounds(); UpdateLayerBounds();
resolver->Resolve(); resolver->Resolve();
......
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