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

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

Issue 2624633002: Remove Sync GetPose VRService call, implement VRVSyncProvider (Closed)
Patch Set: Finish implementation Created 3 years, 11 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 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 // fou nd in the LICENSE file. 2 // Use of this source code is governed by a BSD-style license that can be // fou nd in the LICENSE file.
3 3
4 module device.mojom; 4 module device.mojom;
5 5
6 // 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.
7 struct VRFieldOfView { 7 struct VRFieldOfView {
8 float upDegrees; 8 float upDegrees;
9 float downDegrees; 9 float downDegrees;
10 float leftDegrees; 10 float leftDegrees;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); 77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices);
78 // Inform the service that the page is listening for vrdisplayactivate events. 78 // Inform the service that the page is listening for vrdisplayactivate events.
79 SetListeningForActivate(bool listening); 79 SetListeningForActivate(bool listening);
80 }; 80 };
81 81
82 interface VRServiceClient { 82 interface VRServiceClient {
83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo);
84 }; 84 };
85 85
86 interface VRDisplay { 86 interface VRDisplay {
87 [Sync]
88 GetPose() => (VRPose? pose);
89 ResetPose(); 87 ResetPose();
90 88
91 RequestPresent(bool secureOrigin) => (bool success); 89 RequestPresent(bool secureOrigin) => (bool success);
92 ExitPresent(); 90 ExitPresent();
93 SubmitFrame(VRPose? pose); 91 SubmitFrame(VRPose? pose);
94 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); 92 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
93 GetVRVSyncProvider(VRVSyncProvider& request);
dcheng 2017/01/12 09:56:56 Out of curiosity, why a separate interface?
mthiesse 2017/01/12 15:49:03 We bind to the VRVSyncProvider on a separate threa
dcheng 2017/01/14 11:22:52 The one thing to watch out for is there won't be a
mthiesse 2017/01/16 20:52:57 Oh, yes I was careful to make sure ordering isn't
94 };
95
96 interface VRVSyncProvider {
97 GetVSync() => (VRPose? pose, double time_seconds);
dcheng 2017/01/12 09:56:56 Is it possible to use mojo.common.mojom.TimeTicks
mthiesse 2017/01/12 15:49:03 Would using TimeDelta be okay? I should probably a
dcheng 2017/01/14 11:22:52 I'm honestly not sure. I know CC sends around Time
mthiesse 2017/01/16 20:52:57 Done? Sidenote, figuring out I had to include "//
95 }; 98 };
96 99
97 interface VRDisplayClient { 100 interface VRDisplayClient {
98 OnChanged(VRDisplayInfo display); 101 OnChanged(VRDisplayInfo display);
99 OnExitPresent(); 102 OnExitPresent();
100 OnBlur(); 103 OnBlur();
101 OnFocus(); 104 OnFocus();
102 OnActivate(VRDisplayEventReason reason); 105 OnActivate(VRDisplayEventReason reason);
103 OnDeactivate(VRDisplayEventReason reason); 106 OnDeactivate(VRDisplayEventReason reason);
104 }; 107 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698