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

Side by Side Diff: device/vr/vr_service.mojom

Issue 2420743003: mojo VR interface simplified (Closed)
Patch Set: address leon@ comments about name 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be // fou nd in the LICENSE file.
3 // found in the LICENSE file.
4 3
5 module device; 4 module device.mojom;
6 5
7 // A field of view, given by 4 degrees describing the view from a center point. 6 // A field of view, given by 4 degrees describing the view from a center point.
8 struct VRFieldOfView { 7 struct VRFieldOfView {
9 float upDegrees; 8 float upDegrees;
10 float downDegrees; 9 float downDegrees;
11 float leftDegrees; 10 float leftDegrees;
12 float rightDegrees; 11 float rightDegrees;
13 }; 12 };
14 13
15 // A display's position, orientation, velocity, and acceleration state at the 14 // A display's position, orientation, velocity, and acceleration state at the
(...skipping 26 matching lines...) Expand all
42 uint32 renderHeight; 41 uint32 renderHeight;
43 }; 42 };
44 43
45 struct VRStageParameters { 44 struct VRStageParameters {
46 array<float, 16> standingTransform; 45 array<float, 16> standingTransform;
47 float sizeX; 46 float sizeX;
48 float sizeZ; 47 float sizeZ;
49 }; 48 };
50 49
51 struct VRDisplay { 50 struct VRDisplay {
52 uint32 index;
53 string displayName; 51 string displayName;
54 VRDisplayCapabilities capabilities; 52 VRDisplayCapabilities capabilities;
55 VRStageParameters? stageParameters; 53 VRStageParameters? stageParameters;
56 VREyeParameters leftEye; 54 VREyeParameters leftEye;
57 VREyeParameters rightEye; 55 VREyeParameters rightEye;
58 }; 56 };
59 57
60 struct VRLayerBounds { 58 struct VRLayerBounds {
61 float left; 59 float left;
62 float top; 60 float top;
63 float width; 61 float width;
64 float height; 62 float height;
65 }; 63 };
66 64
67 interface VRService { 65 interface VRService {
66 GetDisplays() => (bool success);
68 SetClient(VRServiceClient client); 67 SetClient(VRServiceClient client);
69
70 GetDisplays() => (array<VRDisplay> displays);
71 [Sync]
72 GetPose(uint32 index) => (VRPose? pose);
73 ResetPose(uint32 index);
74
75 RequestPresent(uint32 index, bool secureOrigin) => (bool success);
76 ExitPresent(uint32 index);
77 SubmitFrame(uint32 index, VRPose? pose);
78 UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightB ounds);
79 }; 68 };
80 69
81 interface VRServiceClient { 70 interface VRServiceClient {
71 [Sync]
72 GetDisplayClient() => (VRDisplayClient? client);
73 };
74
75 interface VRDevice {
76 [Sync]
77 GetPose() => (VRPose? pose);
78 ResetPose();
79
80 RequestPresent(bool secureOrigin) => (bool success);
81 ExitPresent();
82 SubmitFrame(VRPose? pose);
83 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
84 };
85
86 interface VRDisplayClient {
87 RegisterDevice(VRDevice? device_client);
88 UpdateDisplayInfo(VRDisplay display);
89
82 OnDisplayChanged(VRDisplay display); 90 OnDisplayChanged(VRDisplay display);
83 OnExitPresent(uint32 index); 91 OnExitPresent();
84 OnDisplayConnected(VRDisplay display); 92 OnDisplayConnected(VRDisplay display);
85 OnDisplayDisconnected(uint32 index); 93 OnDisplayDisconnected();
86 }; 94 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698