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

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

Issue 2473903002: Updated ResetPose logic for GVR devices (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9238409817038e7f9ada4174f54f00923ae0bab6..57cb7292c050d4aef9833dee4f9c874522f31b4b 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -188,8 +188,11 @@ VRPosePtr GvrDevice::GetPose() {
void GvrDevice::ResetPose() {
gvr::GvrApi* gvr_api = GetGvrApi();
- if (gvr_api)
- gvr_api->ResetTracking();
+
+ // Should never call RecenterTracking when using with Daydream viewers. On
+ // those devices recentering should only be done via the controller.
+ if (gvr_api && gvr_api->GetViewerType() == GVR_VIEWER_TYPE_CARDBOARD)
+ gvr_api->RecenterTracking();
}
bool GvrDevice::RequestPresent(bool secure_origin) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698