| Index: device/vr/vr_service.mojom
|
| diff --git a/device/vr/vr_service.mojom b/device/vr/vr_service.mojom
|
| index d41b1a9ed09da0fe5157c51d9de5af058d4e1a0d..b4091b32deec6e7d5f1d4ebda87fbf2ad37f4abc 100644
|
| --- a/device/vr/vr_service.mojom
|
| +++ b/device/vr/vr_service.mojom
|
| @@ -15,6 +15,10 @@ struct VRFieldOfView {
|
| // given timestamp.
|
| struct VRPose {
|
| double timestamp;
|
| + double ts_frameStart;
|
| + double ts_getPose;
|
| + double ts_gotPose;
|
| + double ts_submit;
|
| array<float, 4>? orientation;
|
| array<float, 3>? position;
|
| array<float, 3>? angularVelocity;
|
| @@ -22,7 +26,8 @@ struct VRPose {
|
| array<float, 3>? angularAcceleration;
|
| array<float, 3>? linearAcceleration;
|
| // The poseIndex is a sequential ID that's incremented on each distinct
|
| - // getPose result, it may wrap around for long sessions.
|
| + // getPose result, it may wrap around for long sessions. Always positive
|
| + // and nonzero.
|
| uint32 poseIndex;
|
| };
|
|
|
| @@ -61,6 +66,7 @@ struct VRLayerBounds {
|
| float top;
|
| float width;
|
| float height;
|
| + uint32 forPoseIndex;
|
| };
|
|
|
| enum VRDisplayEventReason {
|
| @@ -83,15 +89,20 @@ interface VRServiceClient {
|
| OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo);
|
| };
|
|
|
| +interface VRPoseClient {
|
| + OnPoseReceived(VRPose? pose);
|
| +};
|
| +
|
| interface VRDisplay {
|
| - [Sync]
|
| - GetPose() => (VRPose? pose);
|
| + GetPose(VRPoseClient poseClient);
|
| ResetPose();
|
|
|
| RequestPresent(bool secureOrigin) => (bool success);
|
| ExitPresent();
|
| - SubmitFrame(VRPose? pose);
|
| + SubmitFrame(int32 surfaceHandle, VRPose? pose) => (int32 surfaceHandle, uint32 poseIndex, double renderMs);
|
| UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
|
| +
|
| + GetSurfaceHandle(int32 width, int32 height) => (int32 surfaceHandle);
|
| };
|
|
|
| interface VRDisplayClient {
|
|
|