Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_shell.cc |
| diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc |
| index ba595ae5bf5dd9ef7d0c95cf17f634cc532c5eb2..cdf96ea27dd0def7aaf0c77f1188d3df32c0032d 100644 |
| --- a/chrome/browser/android/vr_shell/vr_shell.cc |
| +++ b/chrome/browser/android/vr_shell/vr_shell.cc |
| @@ -36,6 +36,7 @@ |
| #include "content/public/common/referrer.h" |
| #include "device/vr/android/gvr/gvr_device.h" |
| #include "device/vr/android/gvr/gvr_device_provider.h" |
| +#include "gpu/command_buffer/common/mailbox.h" |
| #include "jni/VrShellImpl_jni.h" |
| #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| #include "ui/android/view_android.h" |
| @@ -324,7 +325,24 @@ void VrShell::SetWebVRSecureOrigin(bool secure_origin) { |
| html_interface_->SetWebVRSecureOrigin(secure_origin); |
| } |
| -void VrShell::SubmitWebVRFrame() {} |
| +void VrShell::SubmitWebVRFrame( |
|
mthiesse
2017/03/02 15:55:16
In a future patch we should consider binding Submi
klausw
2017/03/07 02:55:54
Acknowledged.
|
| + int frame_index, const gpu::Mailbox& mailbox, |
| + device::mojom::VRSubmitFrameClientPtr submit_client) { |
| + PostToGlThreadWhenReady(base::Bind(&VrShellGl::SubmitWebVRFrame, |
| + gl_thread_->GetVrShellGl(), frame_index, |
| + mailbox)); |
| + webvr_submit_client_transferring_ = std::move(submit_client); |
| +} |
| + |
| +void VrShell::OnSubmitWebVRFrameTransferred(int frame_index) { |
| + webvr_submit_client_transferring_->OnSubmitFrameTransferred(); |
| + webvr_submit_client_rendering_ = std::move(webvr_submit_client_transferring_); |
| +} |
| + |
| +void VrShell::OnSubmitWebVRFrameRendered(int frame_index) { |
| + webvr_submit_client_rendering_->OnSubmitFrameRendered(); |
| + webvr_submit_client_rendering_.reset(); |
| +} |
| void VrShell::UpdateWebVRTextureBounds(int16_t frame_index, |
| const gvr::Rectf& left_bounds, |