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

Unified Diff: device/vr/android/gvr/gvr_device.cc

Issue 2396663002: Reland gvr upgrade (Closed)
Patch Set: Created 4 years, 2 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
Index: device/vr/android/gvr/gvr_device.cc
diff --git a/device/vr/android/gvr/gvr_device.cc b/device/vr/android/gvr/gvr_device.cc
index df2a7caf5e69e1f626706d142166a9801325d3b5..787dc0cba70c83f04670e74725a79cc109eef8c9 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -11,8 +11,8 @@
#include "base/trace_event/trace_event.h"
#include "device/vr/android/gvr/gvr_delegate.h"
#include "device/vr/vr_device_manager.h"
-#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h"
-#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
+#include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
+#include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
#include "ui/gfx/transform.h"
#include "ui/gfx/transform_util.h"
@@ -150,7 +150,9 @@ VRPosePtr GvrDevice::GetPose() {
gvr::ClockTimePoint target_time = gvr::GvrApi::GetTimePointNow();
target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos;
- gvr::Mat4f head_mat = gvr_api->GetHeadPoseInStartSpace(target_time);
+ gvr::Mat4f head_mat =
+ gvr_api->GetHeadSpaceFromStartSpaceRotation(target_time);
+ head_mat = gvr_api->ApplyNeckModel(head_mat, 1.0f);
gfx::Transform inv_transform(
head_mat.m[0][0], head_mat.m[0][1], head_mat.m[0][2], head_mat.m[0][3],

Powered by Google App Engine
This is Rietveld 408576698