Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 25 matching lines...) Expand all Loading... | |
| 41 uint32 renderWidth; | 40 uint32 renderWidth; |
| 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 VRDisplayInfo { |
| 52 uint32 index; | 51 uint32 index; |
| 53 string displayName; | 52 string displayName; |
| 54 VRDisplayCapabilities capabilities; | 53 VRDisplayCapabilities capabilities; |
| 55 VRStageParameters? stageParameters; | 54 VRStageParameters? stageParameters; |
| 56 VREyeParameters leftEye; | 55 VREyeParameters leftEye; |
| 57 VREyeParameters rightEye; | 56 VREyeParameters rightEye; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 struct VRLayerBounds { | 59 struct VRLayerBounds { |
| 61 float left; | 60 float left; |
| 62 float top; | 61 float top; |
| 63 float width; | 62 float width; |
| 64 float height; | 63 float height; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 interface VRService { | 66 interface VRService { |
| 68 SetClient(VRServiceClient client); | 67 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient |
| 69 | 68 // so we would never have a half-initialized VRService. |
| 70 GetDisplays() => (array<VRDisplay> displays); | 69 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); |
| 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 }; | 70 }; |
| 80 | 71 |
| 81 interface VRServiceClient { | 72 interface VRServiceClient { |
| 82 OnDisplayChanged(VRDisplay display); | 73 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); |
| 83 OnExitPresent(uint32 index); | |
| 84 OnDisplayConnected(VRDisplay display); | |
| 85 OnDisplayDisconnected(uint32 index); | |
| 86 }; | 74 }; |
| 75 | |
| 76 interface VRDisplay { | |
|
dcheng
2016/11/10 06:21:58
Btw, I know this class didn't have existing commen
| |
| 77 | |
|
dcheng
2016/11/10 06:21:58
Nit: no newline
| |
| 78 [Sync] | |
| 79 GetPose() => (VRPose? pose); | |
| 80 ResetPose(); | |
| 81 | |
| 82 RequestPresent(bool secureOrigin) => (bool success); | |
| 83 ExitPresent(); | |
| 84 SubmitFrame(VRPose? pose); | |
| 85 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); | |
| 86 }; | |
| 87 | |
| 88 interface VRDisplayClient { | |
| 89 OnDisplayChanged(VRDisplayInfo display); | |
| 90 OnExitPresent(); | |
| 91 }; | |
| OLD | NEW |