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

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

Issue 2420743003: mojo VR interface simplified (Closed)
Patch Set: update binding process and update some unittest 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_device_provider.h ('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 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;
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 };
(...skipping 28 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
58 struct VRDisplayWithService {
59 VRDisplay? display;
60 VRDeviceClient? service;
61 };
62
60 struct VRLayerBounds { 63 struct VRLayerBounds {
61 float left; 64 float left;
62 float top; 65 float top;
63 float width; 66 float width;
64 float height; 67 float height;
65 }; 68 };
66 69
67 interface VRService { 70 interface VRService {
71 GetDisplays() => (bool success);
68 SetClient(VRServiceClient client); 72 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 }; 73 };
80 74
81 interface VRServiceClient { 75 interface VRServiceClient {
76 [Sync]
77 GetDisplayClient() => (VRDisplayClient? client);
78 };
79
80 interface VRDeviceClient {
leonhsl(Using Gerrit) 2016/10/25 03:17:40 Still old comments about interface naming... : (VR
81 [Sync]
82 GetPose() => (VRPose? pose);
83 ResetPose();
84
85 RequestPresent(bool secureOrigin) => (bool success);
86 ExitPresent();
87 SubmitFrame(VRPose? pose);
88 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
89 };
90
91 interface VRDisplayClient {
92 RegisterDeviceClient(VRDeviceClient? device_client);
93 UpdateDisplayInfo(VRDisplay display);
94
82 OnDisplayChanged(VRDisplay display); 95 OnDisplayChanged(VRDisplay display);
83 OnExitPresent(uint32 index); 96 OnExitPresent();
84 OnDisplayConnected(VRDisplay display); 97 OnDisplayConnected(VRDisplay display);
85 OnDisplayDisconnected(uint32 index); 98 OnDisplayDisconnected();
86 }; 99 };
OLDNEW
« no previous file with comments | « device/vr/vr_device_provider.h ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698