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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2770353002: WebVR: add angular velocity estimate to pose (Closed)
Patch Set: Enable linear accel, fix angular velocity to be in seated space Created 3 years, 9 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: chrome/browser/android/vr_shell/vr_shell.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index 7a3de3000f39c4ee92d3cc28a4516f973d1463f3..ef9162610ef91aa428a3397e285f75cdcb71f87d 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -182,9 +182,22 @@ class VrShell : public device::GvrDelegate,
void UpdateGamepadData(device::GvrGamepadData) override;
void RegisterGamepadDataFetcher(device::GvrGamepadDataFetcher*) override;
- // TODO(mthiesse): Find a better place for these functions to live.
- static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
+ // TODO(mthiesse): Find a better place for these functions to live. They are
+ // called from both vr_shell_gl and non_presenting_gvr_delegate.
+
+ // Creates a WebVR pose from a GVR pose, including filling in an angular
+ // velocity estimate based on the change between two predicted poses.
+ static device::mojom::VRPosePtr VRPosePtrFromGvrPose(
+ gvr::Mat4f head_matrix_predicted,
+ gvr::Mat4f head_matrix_for_angular_velocity,
+ int64_t epsilon_nanos);
+
+ // Provides a recommended render resolution for WebVR, this is passed on to
+ // the application as renderWidth/Height
static gvr::Sizei GetRecommendedWebVrSize(gvr::GvrApi* gvr_api);
+
+ // Fill in the VRDisplayInfo based on recommended size and other headset
+ // parameters.
static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
gvr::GvrApi* gvr_api,
gvr::Sizei recommended_size,

Powered by Google App Engine
This is Rietveld 408576698