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

Unified Diff: third_party/WebKit/public/platform/modules/vr/vr_service.mojom

Issue 1967633002: Updated VRService to match the latest Blink WebVR interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: And we're back to removing all the array size checks Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRStageParameters.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/vr/vr_service.mojom
diff --git a/third_party/WebKit/public/platform/modules/vr/vr_service.mojom b/third_party/WebKit/public/platform/modules/vr/vr_service.mojom
index 849c34fcd4b3da950a043b4c82956e95330d8f92..788b58cbca52201ac89ec2dbc5347885d8d50457 100644
--- a/third_party/WebKit/public/platform/modules/vr/vr_service.mojom
+++ b/third_party/WebKit/public/platform/modules/vr/vr_service.mojom
@@ -4,26 +4,6 @@
module blink.mojom;
-struct VRVector3 {
- float x;
- float y;
- float z;
-};
-
-struct VRVector4 {
- float x;
- float y;
- float z;
- float w;
-};
-
-struct VRRect {
- int32 x;
- int32 y;
- int32 width;
- int32 height;
-};
-
// A field of view, given by 4 degrees describing the view from a center point.
struct VRFieldOfView {
float upDegrees;
@@ -32,43 +12,51 @@ struct VRFieldOfView {
float rightDegrees;
};
-// A sensor's position, orientation, velocity, and acceleration state at the
+// A display's position, orientation, velocity, and acceleration state at the
// given timestamp.
-struct VRSensorState {
+struct VRPose {
double timestamp;
- uint32 frameIndex;
- VRVector4? orientation;
- VRVector3? position;
- VRVector3? angularVelocity;
- VRVector3? linearVelocity;
- VRVector3? angularAcceleration;
- VRVector3? linearAcceleration;
+ array<float, 4>? orientation;
+ array<float, 3>? position;
+ array<float, 3>? angularVelocity;
+ array<float, 3>? linearVelocity;
+ array<float, 3>? angularAcceleration;
+ array<float, 3>? linearAcceleration;
+};
+
+struct VRDisplayCapabilities {
+ bool hasOrientation;
+ bool hasPosition;
+ bool hasExternalDisplay;
+ bool canPresent;
};
-// Information about the optical properties for an eye in an HMD.
+// Information about the optical properties for an eye in a VRDisplay.
struct VREyeParameters {
- VRFieldOfView minimumFieldOfView;
- VRFieldOfView maximumFieldOfView;
- VRFieldOfView recommendedFieldOfView;
- VRVector3 eyeTranslation;
- VRRect renderRect;
+ VRFieldOfView fieldOfView;
+ array<float, 3> offset;
+ uint32 renderWidth;
+ uint32 renderHeight;
};
-// Information pertaining to Head Mounted Displays.
-struct VRHMDInfo {
- VREyeParameters leftEye;
- VREyeParameters rightEye;
+struct VRStageParameters {
+ array<float, 16> standingTransform;
+ float sizeX;
+ float sizeZ;
};
-struct VRDeviceInfo {
+struct VRDisplay {
uint32 index;
- string deviceName;
- VRHMDInfo? hmdInfo;
+ string displayName;
+ VRDisplayCapabilities capabilities;
+ VRStageParameters? stageParameters;
+ VREyeParameters leftEye;
+ VREyeParameters rightEye;
};
interface VRService {
- GetDevices() => (array<VRDeviceInfo> devices);
+ GetDisplays() => (array<VRDisplay> displays);
[Sync]
- GetSensorState(uint32 index) => (VRSensorState state);
- ResetSensor(uint32 index);
+ GetPose(uint32 index) => (VRPose pose);
+ ResetPose(uint32 index);
};
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRStageParameters.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698