| Index: chrome/browser/android/vr_shell/vr_shell_gl.cc
|
| diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
|
| index 8cc084495e187ba2461f9dcd2d37b6672bf8eb17..a666358aa36155ced534943352afdef5f1e9d985 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
|
| @@ -330,6 +330,7 @@
|
|
|
| void VrShellGl::SubmitWebVRFrame(int16_t frame_index,
|
| const gpu::MailboxHolder& mailbox) {
|
| + DCHECK(submit_client_.get());
|
| TRACE_EVENT0("gpu", "VrShellGl::SubmitWebVRFrame");
|
|
|
| // Swapping twice on a Surface without calling updateTexImage in
|
| @@ -393,7 +394,9 @@
|
| // we move the "rendered" notification after draw, or suppress
|
| // the next vsync until that's done?
|
|
|
| - submit_client_->OnSubmitFrameRendered();
|
| + if (submit_client_) {
|
| + submit_client_->OnSubmitFrameRendered();
|
| + }
|
|
|
| DrawFrame(frame_index);
|
| }
|
| @@ -1214,6 +1217,9 @@
|
|
|
| void VrShellGl::SetWebVrMode(bool enabled) {
|
| web_vr_mode_ = enabled;
|
| + if (!enabled) {
|
| + submit_client_.reset();
|
| + }
|
| }
|
|
|
| void VrShellGl::UpdateWebVRTextureBounds(int16_t frame_index,
|
|
|