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

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

Issue 2488273002: Revert of mojo VR interface simplified (Closed)
Patch Set: 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
« no previous file with comments | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // fou nd in the LICENSE file. 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
3 4
4 module device.mojom; 5 module device;
5 6
6 // A field of view, given by 4 degrees describing the view from a center point. 7 // A field of view, given by 4 degrees describing the view from a center point.
7 struct VRFieldOfView { 8 struct VRFieldOfView {
8 float upDegrees; 9 float upDegrees;
9 float downDegrees; 10 float downDegrees;
10 float leftDegrees; 11 float leftDegrees;
11 float rightDegrees; 12 float rightDegrees;
12 }; 13 };
13 14
14 // A display's position, orientation, velocity, and acceleration state at the 15 // A display's position, orientation, velocity, and acceleration state at the
(...skipping 25 matching lines...) Expand all
40 uint32 renderWidth; 41 uint32 renderWidth;
41 uint32 renderHeight; 42 uint32 renderHeight;
42 }; 43 };
43 44
44 struct VRStageParameters { 45 struct VRStageParameters {
45 array<float, 16> standingTransform; 46 array<float, 16> standingTransform;
46 float sizeX; 47 float sizeX;
47 float sizeZ; 48 float sizeZ;
48 }; 49 };
49 50
50 struct VRDisplayInfo { 51 struct VRDisplay {
51 uint32 index; 52 uint32 index;
52 string displayName; 53 string displayName;
53 VRDisplayCapabilities capabilities; 54 VRDisplayCapabilities capabilities;
54 VRStageParameters? stageParameters; 55 VRStageParameters? stageParameters;
55 VREyeParameters leftEye; 56 VREyeParameters leftEye;
56 VREyeParameters rightEye; 57 VREyeParameters rightEye;
57 }; 58 };
58 59
59 struct VRLayerBounds { 60 struct VRLayerBounds {
60 float left; 61 float left;
61 float top; 62 float top;
62 float width; 63 float width;
63 float height; 64 float height;
64 }; 65 };
65 66
66 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live.
67 interface VRService { 67 interface VRService {
68 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient 68 SetClient(VRServiceClient client);
69 // so we would never have a half-initialized VRService. 69
70 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); 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);
71 }; 79 };
72 80
73 interface VRServiceClient { 81 interface VRServiceClient {
74 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); 82 OnDisplayChanged(VRDisplay display);
83 OnExitPresent(uint32 index);
84 OnDisplayConnected(VRDisplay display);
85 OnDisplayDisconnected(uint32 index);
75 }; 86 };
76
77 interface VRDisplay {
78
79 [Sync]
80 GetPose() => (VRPose? pose);
81 ResetPose();
82
83 RequestPresent(bool secureOrigin) => (bool success);
84 ExitPresent();
85 SubmitFrame(VRPose? pose);
86 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
87 };
88
89 interface VRDisplayClient {
90 OnDisplayChanged(VRDisplayInfo display);
91 OnExitPresent();
92 };
OLDNEW
« no previous file with comments | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698