aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2019-07-02 12:34:58 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2019-07-03 08:53:40 -0500
commit9eb75d4ea6d5df75f8bc18103401e565648c3b9d (patch)
tree4793587ed36f5d05d65d0915d5aef8584631bce4 /components/script
parentfee1418b43264771a5de6dfeaa94128fa6bf8793 (diff)
downloadservo-9eb75d4ea6d5df75f8bc18103401e565648c3b9d.tar.gz
servo-9eb75d4ea6d5df75f8bc18103401e565648c3b9d.zip
Use webxr IPC to get a WebXR device registry to each script thread
Diffstat (limited to 'components/script')
-rw-r--r--components/script/Cargo.toml1
-rw-r--r--components/script/dom/bindings/trace.rs1
-rw-r--r--components/script/script_thread.rs4
3 files changed, 6 insertions, 0 deletions
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 1b9dade72eb..fd270a74fc8 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -111,6 +111,7 @@ uuid = {version = "0.7", features = ["v4"]}
xml5ever = {version = "0.14"}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}
+webxr-api = {git = "https://github.com/servo/webxr", features = ["ipc"]}
[target.'cfg(not(target_os = "ios"))'.dependencies]
mozangle = "0.2"
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 97d440de4a0..7d5d0b0b093 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -485,6 +485,7 @@ unsafe_no_jsmanaged_fields!(WebGLVersion);
unsafe_no_jsmanaged_fields!(WebGLSLVersion);
unsafe_no_jsmanaged_fields!(MediaList);
unsafe_no_jsmanaged_fields!(WebVRGamepadData, WebVRGamepadState, WebVRGamepadHand);
+unsafe_no_jsmanaged_fields!(webxr_api::Registry);
unsafe_no_jsmanaged_fields!(ScriptToConstellationChan);
unsafe_no_jsmanaged_fields!(InteractiveMetrics);
unsafe_no_jsmanaged_fields!(InteractiveWindow);
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index aab5970faac..5afe7f1c2d1 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -626,6 +626,9 @@ pub struct ScriptThread {
/// A handle to the webvr thread, if available
webvr_chan: Option<IpcSender<WebVRMsg>>,
+ /// The WebXR device registry
+ webxr_registry: webxr_api::Registry,
+
/// The worklet thread pool
worklet_thread_pool: DomRefCell<Option<Rc<WorkletThreadPool>>>,
@@ -1212,6 +1215,7 @@ impl ScriptThread {
webgl_chan: state.webgl_chan,
webvr_chan: state.webvr_chan,
+ webxr_registry: state.webxr_registry,
worklet_thread_pool: Default::default(),