Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3999)

Unified Diff: chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc

Issue 2770353002: WebVR: add angular velocity estimate to pose (Closed)
Patch Set: Move angular velocity calculation to helper function Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e2c4daba52f89828af956c1eb151b8ef9c51c3ac..79d92e35a43bc9d322a9ed1409c01c4a2164a6a1 100644
--- a/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
+++ b/chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc
@@ -11,10 +11,6 @@
namespace vr_shell {
-namespace {
-static constexpr int64_t kPredictionTimeWithoutVsyncNanos = 50000000;
-} // namespace
-
NonPresentingGvrDelegate::NonPresentingGvrDelegate(gvr_context* context)
: task_runner_(base::ThreadTaskRunnerHandle::Get()),
binding_(this),
@@ -141,19 +137,14 @@ void NonPresentingGvrDelegate::UpdateVSyncInterval(int64_t timebase_nanos,
void NonPresentingGvrDelegate::SendVSync(base::TimeDelta time,
const GetVSyncCallback& callback) {
- gvr::ClockTimePoint target_time = gvr::GvrApi::GetTimePointNow();
- target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos;
-
if (!gvr_api_) {
callback.Run(device::mojom::VRPosePtr(nullptr), time, -1,
device::mojom::VRVSyncProvider::Status::SUCCESS);
return;
}
- gvr::Mat4f head_mat = gvr_api_->ApplyNeckModel(
- gvr_api_->GetHeadSpaceFromStartSpaceRotation(target_time), 1.0f);
- callback.Run(GvrDelegate::VRPosePtrFromGvrPose(head_mat), time, -1,
- device::mojom::VRVSyncProvider::Status::SUCCESS);
+ callback.Run(GvrDelegate::GetVRPosePtrWithNeckModel(gvr_api_.get(), nullptr),
+ time, -1, device::mojom::VRVSyncProvider::Status::SUCCESS);
}
void NonPresentingGvrDelegate::CreateVRDisplayInfo(
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698