Commit graph

105 commits

Author SHA1 Message Date
Alan Jeffrey
754019f6bc Add test for layers feature (currently always false) 2020-08-04 11:55:06 -05:00
Alan Jeffrey
31de34704d Implement the changes to updating the render state from the WebXR Layers spec 2020-08-03 13:19:22 -05:00
Alan Jeffrey
bf7f4eae31 Update WebXR Layer IDL, and matching changes to the Rust code. 2020-08-03 12:37:01 -05:00
Josh Matthews
c34e587140 Update XRWebGLLayer to match specification. 2020-07-20 15:52:16 -04:00
Alan Jeffrey
349619ed2d Support for webxr layer management 2020-06-28 16:37:45 -05:00
bors-servo
c183f95297
Auto merge of #26551 - Manishearth:per-view, r=asajeffrey
Update to handle per-view eye transforms

Depends on https://github.com/servo/webxr/pull/175
2020-05-18 11:21:33 -04:00
Manish Goregaokar
d627476893 Update to treat view transforms as native-relative 2020-05-18 08:20:54 -07:00
Manish Goregaokar
794624b42b Move viewports to being per-session, not per-frame 2020-05-18 08:20:19 -07:00
huangjiahua
c253ad8399 Handle cancelAnimationFrame() when called within a requestAnimationFrame() callback 2020-05-13 15:41:09 +08:00
Manish Goregaokar
30cd89d2d8 Add feature gating for hit tests 2020-04-19 20:29:14 -07:00
Manish Goregaokar
1b07b77323 Add XRSession::requestHitTestSource() 2020-04-19 20:29:14 -07:00
Manish Goregaokar
e7ba4e5a47 Add XRRay(transform) constructor 2020-04-19 20:29:14 -07:00
bors-servo
33a74a4f4e
Auto merge of #26164 - Manishearth:dirty-endsession, r=jdm
Dirty canvas when exiting immersive sessions

Fixes https://github.com/servo/servo/issues/26162, fixes servo/webxr#155

We basically end up in a situation where the main thread is asleep. It's unclear to me why it doesn't wake up after attempts to interact with the screen, but we stopped dirtying the canvas during the immersive session (https://github.com/servo/servo/pull/26077) so the main thread wasn't awake initially.

This is probably not the cleanest fix -- we really should not be ending up in situations where the main thread is perma-asleep -- however, we should be dirtying the canvas after exiting immersive mode _anyway_ since the contents need to be shown to the user, so this fix is still valid, even if it's not fixing the root cause.
2020-04-13 20:02:48 -04:00
Manish Goregaokar
453be48c94 Dirty layers when changing visibility state 2020-04-13 15:12:41 -07:00
Alan Jeffrey
fda8da0e9d Added first-cut implementation of XR layers 2020-04-13 13:57:58 -05:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Josh Matthews
51145cfd83 Update to 3/4 nightly rustc. 2020-03-10 10:09:07 -04:00
Josh Matthews
aa060dfd59 Remove unused imports. 2020-03-09 21:11:27 -04:00
Josh Matthews
085e17b73c Remove XR canvas dirtying step. 2020-03-09 21:11:27 -04:00
Josh Matthews
fbcf2bbc3e Integrate swapchain surface provider changes into webgl and webxr implementations. 2020-03-09 17:50:54 -04:00
Josh Matthews
a29f4a9afe Revert "Auto merge of #25898 - jdm:rustup, r=asajeffrey"
This reverts commit ea8aed1ba9, reversing
changes made to 3749eb5397.
2020-03-06 00:06:15 -05:00
Josh Matthews
bf7537ef5b Update to 3/4 nightly rustc. 2020-03-04 15:08:18 -05:00
bors-servo
92f5b36f49
Auto merge of #25738 - jsjoeio:jsjoeio/issue-25732-rename-xr, r=Manishearth,jdm
refactor: rename XR to XRSystem

<!-- Please describe your changes on the following line: -->
This PR renames XR to XRSystem.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #25732

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's the changing of a name (XR -> XRSystem)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-24 02:27:13 -05:00
JavaScript Joe
30f474312f refactor: rename XR to XRSystem
chore: fix formatting
refactor: change filename and ref to xrsystem
refactor: change filename XRSystem.webidl
refactor: update crate in navigator
refactor: use XRSystem instead of XR in navigator
refactor: update Bindings.conf
refactor: use XRSystemMethods

fix: update assertions for XRSystem

fix: update manifest json
2020-02-23 14:34:42 -08:00
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