Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigator.getDisplays() should be more async #22505

Open
Manishearth opened this issue Dec 20, 2018 · 1 comment
Open

navigator.getDisplays() should be more async #22505

Manishearth opened this issue Dec 20, 2018 · 1 comment
Labels

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Dec 20, 2018

VR::GetDisplays() currently blocks on an IPC response. Instead, we should have it return the promise immediately and resolve it when we get the IPC response.

fn GetDisplays(&self) -> Rc<Promise> {

(It might be worth having a helper for this, where we can tell the script thread "resolve this promise the moment you get a response from this IPC/mpsc channel" cc @nox)

I'm currently moving this code around, but I'm trying not to change it too much.

@Manishearth Manishearth added the A-webvr label Dec 20, 2018
@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Dec 20, 2018

This is true for RequestPresent as well.

@Manishearth Manishearth mentioned this issue Dec 22, 2018
3 of 6 tasks complete
bors-servo added a commit that referenced this issue Jan 3, 2019
Preliminary WebXR support

This implements just enough WebXR to display to 3DOF devices in
immersive mode only.

Couple missing things:

 - [ ] Handling reference spaces (even if just supporting eye-level spaces)
 - [x] Spec links
 - [ ] We enter immersive mode when baseLayer is set, but it seems like
we're supposed to do this when requestSession is called (immersive-web/webxr#453)
 - [ ] VR/XR should block less (#22505)
 - [x] More pref-gating
 - [x] `views` is a method instead of an attribute because we don't support FrozenArray

<s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation.

r? @jdm @MortimerGoro

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22528)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jan 4, 2019
Preliminary WebXR support

This implements just enough WebXR to display to 3DOF devices in
immersive mode only.

Couple missing things:

 - [ ] Handling reference spaces (even if just supporting eye-level spaces)
 - [x] Spec links
 - [ ] We enter immersive mode when baseLayer is set, but it seems like
we're supposed to do this when requestSession is called (immersive-web/webxr#453)
 - [ ] VR/XR should block less (#22505)
 - [x] More pref-gating
 - [x] `views` is a method instead of an attribute because we don't support FrozenArray

<s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation.

r? @jdm @MortimerGoro

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22528)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jan 4, 2019
Preliminary WebXR support

This implements just enough WebXR to display to 3DOF devices in
immersive mode only.

Couple missing things:

 - [ ] Handling reference spaces (even if just supporting eye-level spaces)
 - [x] Spec links
 - [ ] We enter immersive mode when baseLayer is set, but it seems like
we're supposed to do this when requestSession is called (immersive-web/webxr#453)
 - [ ] VR/XR should block less (#22505)
 - [x] More pref-gating
 - [x] `views` is a method instead of an attribute because we don't support FrozenArray

<s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation.

r? @jdm @MortimerGoro

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22528)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.