Auto merge of #25144 - Manishearth:inline, r=asajeffrey

Support inline sessions (with spatial tracking!)

This assumes that your WebXR backend can tolerate being spawned multiple times in inline mode. Currently there is only one backend that allows inline mode (headless), and it works there. This can be improved with https://github.com/servo/webxr/issues/30 .

Todo:

 - [ ] Add a default inline device to webxr so that there is always a tracking-free inline session available (followup: https://github.com/servo/webxr/issues/101)
 - [x] WPT update
 - [ ] Make inline with spatial tracking a feature request (followup: https://github.com/servo/servo/issues/24270)

fixes https://github.com/servo/servo/issues/24186

Depends on https://github.com/servo/webxr/pull/100
This commit is contained in:
bors-servo 2019-12-11 21:04:47 -05:00 committed by GitHub
commit 073194a618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 210 additions and 146 deletions

View file

@ -7,11 +7,13 @@
dictionary XRRenderStateInit {
double depthNear;
double depthFar;
double inlineVerticalFieldOfView;
XRWebGLLayer baseLayer;
};
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] interface XRRenderState {
readonly attribute double depthNear;
readonly attribute double depthFar;
readonly attribute double inlineVerticalFieldOfView;
readonly attribute XRWebGLLayer? baseLayer;
};

View file

@ -30,7 +30,7 @@ interface XRWebGLLayer {
readonly attribute boolean stencil;
readonly attribute boolean alpha;
readonly attribute WebGLFramebuffer framebuffer;
readonly attribute WebGLFramebuffer? framebuffer;
readonly attribute unsigned long framebufferWidth;
readonly attribute unsigned long framebufferHeight;