Chromium Code Reviews| 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 73afb7117c0ac2266959055deaf971b4f109f303..d78088568e784b92a11f6a0905cef706d6fb4a3f 100644 |
| --- a/chrome/browser/android/vr_shell/vr_shell_gl.cc |
| +++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc |
| @@ -175,7 +175,9 @@ VrShellGl::VrShellGl( |
| VrShellGl::~VrShellGl() { |
| vsync_task_.Cancel(); |
| if (!callback_.is_null()) { |
| - base::ResetAndReturn(&callback_).Run(nullptr, base::TimeDelta(), -1); |
| + base::ResetAndReturn(&callback_) |
| + .Run(nullptr, base::TimeDelta(), -1, |
| + device::mojom::VRVSyncProvider::Error::ERROR_TRY_AGAIN); |
|
bajones
2017/02/23 17:21:22
Could you clarify this? If the VSyncProvider is be
mthiesse
2017/02/23 18:11:58
Added comments.
|
| } |
| if (binding_.is_bound()) { |
| main_thread_task_runner_->PostTask(FROM_HERE, base::Bind( |
| @@ -1091,6 +1093,8 @@ void VrShellGl::OnRequest(device::mojom::VRVSyncProviderRequest request) { |
| void VrShellGl::GetVSync(const GetVSyncCallback& callback) { |
| if (!pending_vsync_) { |
| if (!callback_.is_null()) { |
| + callback.Run(nullptr, base::TimeDelta(), -1, |
| + device::mojom::VRVSyncProvider::Error::ERROR_BAD_REQUEST); |
| mojo::ReportBadMessage("Requested VSync before waiting for response to " |
| "previous request."); |
| return; |
| @@ -1135,7 +1139,8 @@ void VrShellGl::SendVSync(base::TimeDelta time, |
| webvr_head_pose_[frame_index % kPoseRingBufferSize] = head_mat; |
| - callback.Run(VrShell::VRPosePtrFromGvrPose(head_mat), time, frame_index); |
| + callback.Run(VrShell::VRPosePtrFromGvrPose(head_mat), time, frame_index, |
| + device::mojom::VRVSyncProvider::Error::ERROR_NONE); |
| } |
| void VrShellGl::ResetPose() { |