Commit graph

81 commits

Author SHA1 Message Date
Manish Goregaokar
f3e1aba4e3 Add profiling for WebXR 2020-02-22 22:00:05 -08:00
bors-servo
ea7e753cea
Auto merge of #25773 - Manishearth:input-sources-change, r=jdm
Always trigger an input sources change event on session creation

Fixes our behavior to match the spec, and to specifically do it in a way
that makes sense. This is also what Chromium does currently, though I'm
not sure if it does the scheduling the same way.

The spec for this may change, see https://github.com/immersive-web/webxr/issues/961.

This fix, along with https://github.com/servo/servo/pull/25770 , makes
three.js content work on servo. Instead of this fix we can also wait for
https://github.com/mrdoob/three.js/issues/18638 to land (which isn't
certain until we figure out more about
https://github.com/immersive-web/webxr/issues/961 )

Even if https://github.com/immersive-web/webxr/issues/961 decides to
choose the option that obviates this patch, we should probably keep it
for now since there's already content out in the wild relying on this
behavior.

r? @jdm @asajeffrey
2020-02-16 03:10:56 -05:00
Manish Goregaokar
09a23b0cb1 Always trigger an input sources change event on session creation 2020-02-15 07:53:55 -08:00
Patrick Shaughnessy
8e65782efb Expose DOMHighResTimeStamps at lower res 2020-02-03 09:54:39 -05:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm 2020-01-24 20:52:36 +05:30
Manish Goregaokar
9a04a37c1c Gate reference space creation on requested features 2020-01-21 20:19:22 -08:00
Manish Goregaokar
9c34a6585b Handle SetTargetRayMode and SetHandedness 2020-01-21 15:47:30 -08:00
Manish Goregaokar
f721113f8d Handle AddInput/RemoveInput events 2020-01-09 08:16:25 +05:30
Manish Goregaokar
666ee5ceff Kick the raf loop in inline sessions 2020-01-02 13:56:16 +05:30
Manish Goregaokar
01f27e9c69 Do not wait for rAF to be requested in render loop 2019-12-29 00:01:35 -08:00
Manish Goregaokar
3414c8d22d Correctly clamp ivfov and depth values 2019-12-11 22:12:07 -08:00
Manish Goregaokar
f52a6f0e8f Set inlineVerticalFieldOfView to null for immersive sessions 2019-12-11 22:12:07 -08:00
Manish Goregaokar
e27687497b Use correct timestamps 2019-12-11 22:11:23 -08:00
Manish Goregaokar
51af3be468 Don't attempt to wait for session ending when it has already ended
See https://github.com/immersive-web/webxr/pull/939
2019-12-10 15:13:47 -08:00
Manish Goregaokar
8aaa8493a7 Give inline sessions the correct projection matrices 2019-12-10 15:13:42 -08:00
Manish Goregaokar
a64e02a451 Add inlineVerticalFieldOfView support 2019-12-10 15:13:42 -08:00
Manish Goregaokar
2066a5509a Allow constructing inline sessions 2019-12-10 15:13:42 -08:00
Manish Goregaokar
87f729731a Add support for squeeze events 2019-11-22 13:58:13 -08:00
Patrick Walton
a358bca766 Use surfman for managing GL surfaces
Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com>
Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2019-11-01 08:47:11 -05:00
Manish Goregaokar
24bfca9b71 Always request new XR frames 2019-10-15 11:21:17 -07:00
Manish Goregaokar
5e098e3a2a Unconditionally set up rAF loop on initialization 2019-10-15 11:21:17 -07:00
Manish Goregaokar
49a8ed0e9e Expose onvisibilitychange 2019-10-11 16:12:37 -07:00
Manish Goregaokar
d90317cfe4 Fire visibilitychange event appropriately 2019-10-11 16:02:30 -07:00
Manish Goregaokar
75c763120f Expose XRSession.visibilityState 2019-10-11 16:01:12 -07:00
Manish Goregaokar
26b2f02210 Report correct environmentblendmode 2019-10-11 13:09:13 -07:00
Manish Goregaokar
66fea73289 Remove XRSession.mode 2019-10-11 12:42:49 -07:00
Manish Goregaokar
8ae1c2e0ad Hook XRInputSourceArray into XRSession 2019-10-08 15:34:20 -07:00
Manish Goregaokar
b094ceb076 Add event handlers for sessionend events 2019-10-03 14:13:51 -07:00
Manish Goregaokar
2e577f7eec Fire selection events from XR input sources 2019-10-03 14:13:51 -07:00
Manish Goregaokar
0d79b2beaf Allow setting near/far clip planes 2019-08-23 08:01:21 -07:00
Gregory Terzian
358b82279f allow for only a single raf message, until callbacks execute 2019-07-30 17:12:59 +08:00
Alan Jeffrey
c757a9c009 Get XR sessions to track the draw texture, so we render the XR framebuffer rather than the default canvas framebuffer 2019-07-28 10:24:38 -04:00
Alan Jeffrey
133a17e15c Replace use of callbacks in webxr by channels 2019-07-26 23:36:13 -05:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Manish Goregaokar
3f95d304ec Support XRTest.disconnectAllDevices() 2019-07-23 00:52:33 -07:00
Manish Goregaokar
b0002a003d Make use of ended flag, get rid of XRLayer 2019-07-22 09:32:01 -07:00
Manish Goregaokar
b66cbd364a Support end events and end() 2019-07-22 09:32:01 -07:00
Manish Goregaokar
c9204375eb Attach XR event callbacks 2019-07-22 09:32:01 -07:00
Alan Jeffrey
aa0a72df0f Added framebuffer and related attributes to XRWebGLLayer 2019-07-18 14:24:50 -05:00
bors-servo
b6cc0f60a9
Auto merge of #23786 - Manishearth:xr-wpt, r=asajeffrey
Enable XR WPT tests

This enables the tests. Most still fail, I plan to go through the
failures more soon.

xrFrame_getPose's failure seems to indicate we have broken matrix math.
I'm not sure what, the bug seems to not come from a simple matrix
inversion/ordering mishap.

This does add empty stubs for session ending since the test infra relies on these existing for almost every test (https://github.com/servo/servo/issues/23788). We will need to add support for this from the webxr repo side. We also need to add support for user activation (https://github.com/servo/servo/issues/23787).

r? @asajeffrey

<!-- 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/23786)
<!-- Reviewable:end -->
2019-07-17 01:18:51 -04:00
Manish Goregaokar
4e7a59e872 Unset active bool on XRFrame 2019-07-16 22:17:22 -07:00
Manish Goregaokar
ffc943fec7 Add stubs for session start/end 2019-07-16 22:17:22 -07:00
Alan Jeffrey
10f3c2230b Dirty the canvas when WebXR draws to its GL context 2019-07-16 17:52:49 -05:00
Manish Goregaokar
0b88c565c5 Add active and animationFrame flags to XRFrame 2019-07-11 11:12:59 -07:00
Manish Goregaokar
b654b6007a Hook input code into new webxr crate 2019-07-11 11:12:59 -07:00
Manish Goregaokar
b818af794a Add a viewer typed reference space 2019-07-11 11:12:59 -07:00
Manish Goregaokar
57c85361be Clean up vrdisplay, set active immersive session correctly 2019-07-11 11:12:59 -07:00
Manish Goregaokar
8780edb165 Hook webxr data into XRFrame/XRView/XRSpace 2019-07-11 11:12:59 -07:00
Manish Goregaokar
877b6c67a1 Trigger callbacks in RAF 2019-07-11 11:12:59 -07:00
Manish Goregaokar
33421e8ee0 Apply pending render states in RAF 2019-07-11 11:12:59 -07:00