aboutsummaryrefslogtreecommitdiffstats
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
parentfee1418b43264771a5de6dfeaa94128fa6bf8793 (diff)
downloadservo-9eb75d4ea6d5df75f8bc18103401e565648c3b9d.tar.gz
servo-9eb75d4ea6d5df75f8bc18103401e565648c3b9d.zip
Use webxr IPC to get a WebXR device registry to each script thread
-rw-r--r--Cargo.lock151
-rw-r--r--components/canvas_traits/Cargo.toml1
-rw-r--r--components/canvas_traits/webgl.rs1
-rw-r--r--components/constellation/Cargo.toml1
-rw-r--r--components/constellation/constellation.rs8
-rw-r--r--components/constellation/pipeline.rs6
-rw-r--r--components/script/Cargo.toml1
-rw-r--r--components/script/dom/bindings/trace.rs1
-rw-r--r--components/script/script_thread.rs4
-rw-r--r--components/script_traits/Cargo.toml1
-rw-r--r--components/script_traits/lib.rs2
-rw-r--r--components/servo/lib.rs6
12 files changed, 148 insertions, 35 deletions
diff --git a/Cargo.lock b/Cargo.lock
index ee5726ad8ad..ea57cbd81f8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -225,7 +225,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -427,9 +427,10 @@ dependencies = [
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
+ "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr_traits 0.0.1",
- "webxr-api 0.0.1 (git+https://github.com/servo/webxr.git)",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
@@ -618,7 +619,7 @@ dependencies = [
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr 0.0.1",
"webvr_traits 0.0.1",
- "webxr-api 0.0.1 (git+https://github.com/servo/webxr.git)",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
@@ -660,6 +661,7 @@ dependencies = [
"style_traits 0.0.1",
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr_traits 0.0.1",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
@@ -818,7 +820,7 @@ dependencies = [
"phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -832,7 +834,7 @@ dependencies = [
"phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -855,6 +857,15 @@ dependencies = [
]
[[package]]
+name = "ctor"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "darling"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -871,7 +882,7 @@ dependencies = [
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -882,7 +893,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -934,7 +945,7 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -944,7 +955,7 @@ version = "0.0.1"
dependencies = [
"darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -955,7 +966,7 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1035,7 +1046,7 @@ dependencies = [
name = "dom_struct"
version = "0.0.1"
dependencies = [
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1044,7 +1055,7 @@ name = "domobject_derive"
version = "0.0.1"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1175,7 +1186,7 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1192,6 +1203,14 @@ dependencies = [
]
[[package]]
+name = "erased-serde"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "error-chain"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1215,7 +1234,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1458,6 +1477,16 @@ dependencies = [
]
[[package]]
+name = "ghost"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "gif"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1954,7 +1983,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1996,7 +2025,7 @@ dependencies = [
"mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"markup5ever 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2152,6 +2181,26 @@ dependencies = [
]
[[package]]
+name = "inventory"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ghost 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "inventory-impl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "inventory-impl"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "io-surface"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2489,7 +2538,7 @@ dependencies = [
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr 0.0.1",
"webvr_traits 0.0.1",
- "webxr-api 0.0.1 (git+https://github.com/servo/webxr.git)",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
@@ -3024,7 +3073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3403,7 +3452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "quote"
-version = "0.6.3"
+version = "0.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3799,6 +3848,7 @@ dependencies = [
"uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr_traits 0.0.1",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
"xml5ever 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3889,6 +3939,7 @@ dependencies = [
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.60.0 (git+https://github.com/servo/webrender)",
"webvr_traits 0.0.1",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
@@ -3946,7 +3997,7 @@ version = "1.0.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3983,7 +4034,7 @@ dependencies = [
"rust-webvr 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "webxr 0.0.1 (git+https://github.com/servo/webxr.git)",
+ "webxr 0.0.1 (git+https://github.com/servo/webxr)",
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winres 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4226,7 +4277,7 @@ version = "0.0.1"
dependencies = [
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4248,7 +4299,7 @@ version = "0.1.0"
source = "git+https://github.com/servo/media#2dabf1ab7e3b6d3b6764eebdf8855431367752c4"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4477,7 +4528,7 @@ dependencies = [
"phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4559,7 +4610,7 @@ dependencies = [
"darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_common 0.0.1",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4623,7 +4674,7 @@ version = "0.15.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4633,7 +4684,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4768,7 +4819,7 @@ dependencies = [
"darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_common 0.0.1",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4963,6 +5014,28 @@ version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "typetag"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "inventory 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
+ "typetag-impl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "typetag-impl"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "ucd"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5333,21 +5406,24 @@ dependencies = [
[[package]]
name = "webxr"
version = "0.0.1"
-source = "git+https://github.com/servo/webxr.git#49b9312354e322ab3cd94695af7d30f09cea8d3a"
+source = "git+https://github.com/servo/webxr#d4e8e1599a34a3c07953cfa2b81187763748daac"
dependencies = [
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "webxr-api 0.0.1 (git+https://github.com/servo/webxr.git)",
+ "webxr-api 0.0.1 (git+https://github.com/servo/webxr)",
]
[[package]]
name = "webxr-api"
version = "0.0.1"
-source = "git+https://github.com/servo/webxr.git#49b9312354e322ab3cd94695af7d30f09cea8d3a"
+source = "git+https://github.com/servo/webxr#d4e8e1599a34a3c07953cfa2b81187763748daac"
dependencies = [
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
+ "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -5634,6 +5710,7 @@ dependencies = [
"checksum cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b16e382d9b983fdb9ac6a36b37fdeb84ce3ea81f749febfee3463cfa7f24275e"
"checksum cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "19f7a08ed4ecd7e077d4cee63937473e6f7cf57b702a9114ef41751b2cbc0f60"
"checksum cstr-macros 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0f12dd847ec773fc98d75edba5394cb87d0f35e7ee548a4c81849ca6374b3d48"
+"checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c"
"checksum darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6"
"checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c"
"checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1"
@@ -5660,6 +5737,7 @@ dependencies = [
"checksum enum-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85012092e543e198a02f3ac3d587798253e8ec374bc9c3d7da5319cf579ea4c6"
"checksum enum-iterator-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "293ee6af5f9349c2594a7c867b7c89347fb939415508e6367a19bd246ffc08d8"
"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e"
+"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60"
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
"checksum euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7a4719a544a67ed3fc33784c2bd2c6581663dfe83b719a6ae05c6dabc3b51c73"
"checksum euclid_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcb84c18ea5037a1c5a23039b4ff29403abce2e0d6b1daa11cf0bde2b30be15"
@@ -5685,6 +5763,7 @@ dependencies = [
"checksum gaol 0.2.0 (git+https://github.com/servo/gaol)" = "<none>"
"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592"
"checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05"
+"checksum ghost 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5297b71943dc9fea26a3241b178c140ee215798b7f79f7773fd61683e25bca74"
"checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c"
"checksum gl_generator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0ffaf173cf76c73a73e080366bf556b4776ece104b06961766ff11449f38604"
"checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd"
@@ -5744,6 +5823,8 @@ dependencies = [
"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d"
"checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245"
"checksum influent 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c75b206f14630274457146294c0e01297ed555176306fd074d5c34a30bb348"
+"checksum inventory 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21df85981fe094480bc2267723d3dc0fd1ae0d1f136affc659b7398be615d922"
+"checksum inventory-impl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a877ae8bce77402d5e9ed870730939e097aad827b2a932b361958fa9d6e75aa"
"checksum io-surface 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9a33981dff54baaff80f4decb487a65d148a3c00facc97820d0f09128f74dd"
"checksum iovec 0.1.3 (git+https://github.com/servo/iovec.git?branch=servo)" = "<none>"
"checksum ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f82db24b0c53ee2d54b420bb9258f2b787611fe3e7a28d514b5ea54fe65cd365"
@@ -5843,7 +5924,7 @@ dependencies = [
"checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978"
"checksum procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9a1574a51c3fd37b26d2c0032b649d08a7d51d4cca9c41bbc5bf7118fa4509d0"
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
-"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035"
+"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db"
"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
@@ -5952,6 +6033,8 @@ dependencies = [
"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
"checksum typed-arena 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6c06a92aef38bb4dc5b0df00d68496fc31307c5344c867bb61678c6e1671ec5"
"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
+"checksum typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7573a67ebbc8696e879d902067bc278671b7502abd8604b7336d87efd47e5858"
+"checksum typetag-impl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef49605e1070ec194bd9d2c360a975d47ba164460de183cbc53aa1be8c4db6dc"
"checksum ucd 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe4fa6e588762366f1eb4991ce59ad1b93651d0b769dfb4e4d1c5c4b943d1159"
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum uluru 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2606e9192f308ddc4f0b3c5d1bf3400e28a70fff956e9d9f46d23b094746d9f"
@@ -5985,8 +6068,8 @@ dependencies = [
"checksum webrender 0.60.0 (git+https://github.com/servo/webrender)" = "<none>"
"checksum webrender_api 0.60.0 (git+https://github.com/servo/webrender)" = "<none>"
"checksum webrender_build 0.0.1 (git+https://github.com/servo/webrender)" = "<none>"
-"checksum webxr 0.0.1 (git+https://github.com/servo/webxr.git)" = "<none>"
-"checksum webxr-api 0.0.1 (git+https://github.com/servo/webxr.git)" = "<none>"
+"checksum webxr 0.0.1 (git+https://github.com/servo/webxr)" = "<none>"
+"checksum webxr-api 0.0.1 (git+https://github.com/servo/webxr)" = "<none>"
"checksum weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc44aa200daee8b1f3a004beaf16554369746f1b4486f0cf93b0caf8a3c2d1e"
"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml
index c477e3c8c06..52388be8863 100644
--- a/components/canvas_traits/Cargo.toml
+++ b/components/canvas_traits/Cargo.toml
@@ -25,6 +25,7 @@ pixels = {path = "../pixels"}
serde = "1.0"
serde_bytes = "0.10"
servo_config = {path = "../config"}
+typetag = "0.1"
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}
webxr-api = {git = "https://github.com/servo/webxr"}
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index f07cd99fb46..2df61282863 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -177,6 +177,7 @@ impl WebGLMsgSender {
}
}
+#[typetag::serde]
impl webxr_api::WebGLExternalImageApi for WebGLMsgSender {
fn lock(&self) -> Result<(GLuint, Size2D<i32>, GLsync), webxr_api::Error> {
let (sender, receiver) = webgl_channel().or(Err(webxr_api::Error::CommunicationError))?;
diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml
index 718e537e64b..f91396343d8 100644
--- a/components/constellation/Cargo.toml
+++ b/components/constellation/Cargo.toml
@@ -50,6 +50,7 @@ servo_remutex = {path = "../remutex"}
servo_url = {path = "../url"}
webvr_traits = {path = "../webvr_traits"}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
+webxr-api = {git = "https://github.com/servo/webxr", features = ["ipc"]}
[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"}
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index 6f8bfbcb849..558734031ec 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -390,6 +390,9 @@ pub struct Constellation<Message, LTF, STF> {
/// A channel through which messages can be sent to the webvr thread.
webvr_chan: Option<IpcSender<WebVRMsg>>,
+ /// The XR device registry
+ webxr_registry: webxr_api::Registry,
+
/// A channel through which messages can be sent to the canvas paint thread.
canvas_chan: IpcSender<CanvasMsg>,
@@ -455,6 +458,9 @@ pub struct InitialConstellationState {
/// A channel to the webgl thread.
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
+
+ /// The XR device registry
+ pub webxr_registry: webxr_api::Registry,
}
/// Data needed for webdriver
@@ -751,6 +757,7 @@ where
}),
webgl_threads: state.webgl_threads,
webvr_chan: state.webvr_chan,
+ webxr_registry: state.webxr_registry,
canvas_chan: CanvasPaintThread::start(),
pending_approval_navigations: HashMap::new(),
pressed_mouse_buttons: 0,
@@ -997,6 +1004,7 @@ where
.as_ref()
.map(|threads| threads.pipeline()),
webvr_chan: self.webvr_chan.clone(),
+ webxr_registry: self.webxr_registry.clone(),
});
let pipeline = match result {
diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs
index 3c1ebd7896a..9b1f0e7b336 100644
--- a/components/constellation/pipeline.rs
+++ b/components/constellation/pipeline.rs
@@ -188,6 +188,9 @@ pub struct InitialPipelineState {
/// A channel to the webvr thread.
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
+
+ /// The XR device registry
+ pub webxr_registry: webxr_api::Registry,
}
pub struct NewPipeline {
@@ -305,6 +308,7 @@ impl Pipeline {
webrender_document: state.webrender_document,
webgl_chan: state.webgl_chan,
webvr_chan: state.webvr_chan,
+ webxr_registry: state.webxr_registry,
};
// Spawn the child process.
@@ -510,6 +514,7 @@ pub struct UnprivilegedPipelineContent {
webrender_document: webrender_api::DocumentId,
webgl_chan: Option<WebGLPipeline>,
webvr_chan: Option<IpcSender<WebVRMsg>>,
+ webxr_registry: webxr_api::Registry,
}
impl UnprivilegedPipelineContent {
@@ -554,6 +559,7 @@ impl UnprivilegedPipelineContent {
content_process_shutdown_chan: self.script_content_process_shutdown_chan,
webgl_chan: self.webgl_chan,
webvr_chan: self.webvr_chan,
+ webxr_registry: self.webxr_registry,
webrender_document: self.webrender_document,
webrender_api_sender: self.webrender_api_sender.clone(),
layout_is_busy: layout_thread_busy_flag.clone(),
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(),
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index 5316d261881..20f58e6bb27 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -39,3 +39,4 @@ time = "0.1.12"
url = "1.2"
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"]}
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index c41f215d6ad..40e710846f9 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -628,6 +628,8 @@ pub struct InitialScriptState {
pub webgl_chan: Option<WebGLPipeline>,
/// A channel to the webvr thread, if available.
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
+ /// The XR device registry
+ pub webxr_registry: webxr_api::Registry,
/// The Webrender document ID associated with this thread.
pub webrender_document: DocumentId,
/// FIXME(victor): The Webrender API sender in this constellation's pipeline
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 545d3645306..9ef5013a7b2 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -287,7 +287,8 @@ where
// 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();
+ let mut webxr_registry =
+ webxr_api::Registry::new().expect("Failed to create WebXR device registry");
if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) {
embedder.register_webxr(&mut webxr_registry);
}
@@ -319,6 +320,7 @@ where
webrender_api_sender,
window.gl(),
webvr_services,
+ webxr_registry,
);
// Send the constellation's swmanager sender to service worker manager thread
@@ -628,6 +630,7 @@ fn create_constellation(
webrender_api_sender: webrender_api::RenderApiSender,
window_gl: Rc<dyn gl::Gl>,
webvr_services: Option<VRServiceManager>,
+ webxr_registry: webxr_api::Registry,
) -> (Sender<ConstellationMsg>, SWManagerSenders) {
// Global configuration options, parsed from the command line.
let opts = opts::get();
@@ -708,6 +711,7 @@ fn create_constellation(
webrender_api_sender,
webgl_threads,
webvr_chan,
+ webxr_registry,
};
let (constellation_chan, from_swmanager_sender) = Constellation::<
script_layout_interface::message::Msg,