| Index: chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
|
| diff --git a/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
|
| index c2457ba4176e627bc8351dec29fdc59ff6924d6c..8ae932a349273b6b1051c1f81b984ca60e9e92b3 100644
|
| --- a/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
|
| +++ b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
|
| @@ -13,7 +13,9 @@
|
| namespace vr_shell {
|
|
|
| namespace {
|
| +// TODO(klausw): These are duplicates from vr_shell_gl.cc, put in header file?
|
| static constexpr int64_t kPredictionTimeWithoutVsyncNanos = 50000000;
|
| +static constexpr int64_t kAngularVelocityEpsilonNanos = 1000000;
|
| } // namespace
|
|
|
| NonPresentingGvrDelegate::NonPresentingGvrDelegate(gvr_context* context)
|
| @@ -153,8 +155,14 @@ void NonPresentingGvrDelegate::SendVSync(base::TimeDelta time,
|
|
|
| gvr::Mat4f head_mat = gvr_api_->ApplyNeckModel(
|
| gvr_api_->GetHeadSpaceFromStartSpaceRotation(target_time), 1.0f);
|
| - callback.Run(VrShell::VRPosePtrFromGvrPose(head_mat), time, -1,
|
| - device::mojom::VRVSyncProvider::Status::SUCCESS);
|
| +
|
| + target_time.monotonic_system_time_nanos += kAngularVelocityEpsilonNanos;
|
| + gvr::Mat4f head_mat_2 =
|
| + gvr_api_->GetHeadSpaceFromStartSpaceRotation(target_time);
|
| +
|
| + callback.Run(VrShell::VRPosePtrFromGvrPose(head_mat, head_mat_2,
|
| + kAngularVelocityEpsilonNanos),
|
| + time, -1, device::mojom::VRVSyncProvider::Status::SUCCESS);
|
| }
|
|
|
| bool NonPresentingGvrDelegate::SupportsPresentation() {
|
|
|