aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2019-07-01 11:50:25 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2019-07-02 18:23:56 -0500
commit91d1b52b38e4e4c300a12252dc491ecebb2dfb76 (patch)
tree782d2bb4236371783e25965272bd77061be00583 /components/servo/lib.rs
parentb4ed3b6f3c6f8dedde41ac28ec3afdb117f5a44a (diff)
downloadservo-91d1b52b38e4e4c300a12252dc491ecebb2dfb76.tar.gz
servo-91d1b52b38e4e4c300a12252dc491ecebb2dfb76.zip
Initialize a wevxr device registry from Servo
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 0e5ccf2c2ad..545d3645306 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -285,6 +285,13 @@ where
// can't defer it after `create_constellation` has started.
script::init();
+ // For the moment, we enable use both the webxr crate and the rust-webvr crate,
+ // but we are migrating over to just using webxr.
+ let mut webxr_registry = webxr_api::Registry::new();
+ if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) {
+ embedder.register_webxr(&mut webxr_registry);
+ }
+
let mut webvr_heartbeats = Vec::new();
let webvr_services = if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) {
let mut services = VRServiceManager::new();