Commit graph

100 commits

Author SHA1 Message Date
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
Manish Goregaokar
cf53cf6cc5 Add actual frame request in rAF 2019-07-11 11:12:59 -07:00
Manish Goregaokar
84014ffc54 Add basic rAF and cAF functions that do nothing with the callbacks 2019-07-11 11:12:59 -07:00
Manish Goregaokar
c7ed4379e8 Fill in updateRenderState() stubs 2019-07-11 11:12:59 -07:00
Manish Goregaokar
d55ed4240c Hook requestSession() into new XR crate 2019-07-11 11:12:59 -07:00
Manish Goregaokar
26e0aaca6c Update reference spaces to new model 2019-06-10 15:50:44 -07:00
Bastien Orivel
292d468cd1 Use the newly added inCompartments option everywhere it can be 2019-05-25 17:28:07 +02:00
Manish Goregaokar
0756923e52 Make viewerSpace [SameObject] 2019-05-03 18:46:31 -07:00
Manish Goregaokar
5c8132c379 Use initialized input sources in getInputSources() 2019-05-03 14:37:41 -07:00
Aron Zwaan
e2e6e2ac94 Pass InCompartment by value 2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf Add proof parameter to Promise::new_in_current_compartment 2019-04-24 19:46:10 +02:00
bors-servo
be1e0690eb
Auto merge of #23158 - BartGitHub:promise-constructor, r=jdm
Promise constructor

In this PR, measures are taken that prevent the ```Promise::new``` constructor from being used outside a compartment.

---
<!-- 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 #22982 (GitHub issue number if applicable)

<!-- Either: -->
- [x] These changes do not require tests because no new functionality is added.

<!-- 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. -->

<!-- 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/23158)
<!-- Reviewable:end -->
2019-04-06 03:33:08 -04:00
Manish Goregaokar
813613628d Add XRSession.viewerSpace 2019-04-04 17:45:09 -07:00
Manish Goregaokar
fcec93ae16 Consistently use GlobalScope in XR code 2019-04-03 23:55:33 -07:00
Aron Zwaan
782b58587a Rename Promise::new to Promise::new_in_current_compartment 2019-04-03 20:45:30 +02:00
Manish Goregaokar
2e48606569 Compute view matrix from viewer pose 2019-03-26 00:09:15 -07:00
Manish Goregaokar
1e1f527c82 Formatting changes 2019-03-25 11:38:20 -07:00
Manish Goregaokar
e20909cf43 Allow VR RAF loop to handle changes in the layer, support pending renderstates 2019-03-25 09:08:11 -07:00
Manish Goregaokar
401b470e90 Hook XRRenderState into XRSession 2019-03-25 09:06:49 -07:00
Manish Goregaokar
22e5ce5ff3 Improve getViewerPose() 2019-03-20 18:30:29 -07:00
Manish Goregaokar
191fcf66cc Add requestReferenceSpace 2019-03-18 16:27:59 -07:00
Manish Goregaokar
37872b8b9c Add XREnvironmentBlendMode 2019-02-19 16:08:39 +05:30
Manish Goregaokar
e2522d36ff Use async VR presentation code for XRSession 2019-01-07 23:43:04 -08:00
Manish Goregaokar
90e87b97ba Init XR present on XR::RequestSession() with empty context 2019-01-07 15:24:26 -08:00
Manish Goregaokar
64a64a8d6d Properly support depthNear and depthFar 2018-12-22 22:53:38 -08:00
Manish Goregaokar
c6c6b518cb Add spec links 2018-12-22 22:30:42 -08:00
Manish Goregaokar
4b2fa5ef08 Invoke XR RAFs appropriately 2018-12-21 16:58:30 -08:00
Manish Goregaokar
1b11a3063c Support attaching RAF callbacks 2018-12-21 16:02:24 -08:00
Manish Goregaokar
e259ff727e Simple presentation 2018-12-20 17:42:22 -08:00
Manish Goregaokar
682c89a18c allow setting base layer 2018-12-20 15:44:26 -08:00
Manish Goregaokar
d5911816e1 Fill in XR.requestSession 2018-12-19 19:56:52 -08:00
Manish Goregaokar
ebf9ccc9de Basic XRSession interface 2018-12-19 15:40:38 -08:00