mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Initialize a wevxr device registry from Servo
This commit is contained in:
parent
b4ed3b6f3c
commit
91d1b52b38
9 changed files with 61 additions and 0 deletions
|
@ -78,6 +78,7 @@ webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
|||
webdriver_server = {path = "../webdriver_server", optional = true}
|
||||
webvr = {path = "../webvr"}
|
||||
webvr_traits = {path = "../webvr_traits"}
|
||||
webxr-api = "0.0.1"
|
||||
|
||||
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies]
|
||||
gaol = {git = "https://github.com/servo/gaol"}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue