| 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..61579a5e96ff19ee24f944a97c037b1eb6d6e947 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell.h
|
| +++ b/chrome/browser/android/vr_shell/vr_shell.h
|
| @@ -182,14 +182,36 @@ 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,
|
| uint32_t device_id);
|
|
|
| + // TODO(mthiesse): If gvr::PlatformInfo().GetPosePredictionTime() is ever
|
| + // exposed, use that instead (it defaults to 50ms on most platforms).
|
| + static constexpr int64_t kPredictionTimeWithoutVsyncNanos = 50000000;
|
| +
|
| + // Time offset used for calculating angular velocity from a pair of predicted
|
| + // poses. The precise value shouldn't matter as long as it's nonzero and much
|
| + // less than a frame.
|
| + static constexpr int64_t kAngularVelocityEpsilonNanos = 1000000;
|
| +
|
| private:
|
| ~VrShell() override;
|
| void PostToGlThreadWhenReady(const base::Closure& task);
|
|
|