Auto merge of #23546 - asajeffrey:magicleap-webvr-second-cut, r=Manishearth

Add Servo3D immersive demo for magicleap

<!-- Please describe your changes on the following line: -->

An immersive mode demo for magicleap.

---
<!-- 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 (apart from dupes, sigh)
- [X] These changes fix #22402 (GitHub issue number if applicable)
- [X] These changes do not require tests because it's a new platform

<!-- 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/23546)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-06-13 18:49:16 -04:00 committed by GitHub
commit 9213331910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 454 additions and 77 deletions

View file

@ -161,10 +161,10 @@ pub trait WindowMethods {
pub trait EmbedderMethods {
/// Returns a thread-safe object to wake up the window's event loop.
fn create_event_loop_waker(&self) -> Box<dyn EventLoopWaker>;
fn create_event_loop_waker(&mut self) -> Box<dyn EventLoopWaker>;
/// Register services with a VRServiceManager.
fn register_vr_services(
&self,
&mut self,
_: &mut VRServiceManager,
_: &mut Vec<Box<WebVRMainThreadHeartbeat>>,
) {

View file

@ -1436,7 +1436,7 @@ impl Window {
let complete = match join_port.try_recv() {
Err(TryRecvError::Empty) => {
info!("script: waiting on layout");
debug!("script: waiting on layout");
join_port.recv().unwrap()
},
Ok(reflow_complete) => reflow_complete,

View file

@ -199,7 +199,7 @@ impl<Window> Servo<Window>
where
Window: WindowMethods + 'static + ?Sized,
{
pub fn new(embedder: Box<EmbedderMethods>, window: Rc<Window>) -> Servo<Window> {
pub fn new(mut embedder: Box<EmbedderMethods>, window: Rc<Window>) -> Servo<Window> {
// Global configuration options, parsed from the command line.
let opts = opts::get();

View file

@ -22,7 +22,8 @@ gleam = "0.6"
ipc-channel = "0.11.2"
log = "0.4"
msg = {path = "../msg"}
rust-webvr = {version = "0.11.3", features = ["mock", "openvr", "vrexternal"]}
rust-webvr = {version = "0.11.4", features = ["mock", "openvr", "vrexternal"]}
rust-webvr-api = "0.11.4"
script_traits = {path = "../script_traits"}
servo_config = {path = "../config"}
webvr_traits = {path = "../webvr_traits" }

View file

@ -12,3 +12,4 @@ pub use crate::webvr_thread::{WebVRCompositorHandler, WebVRThread};
pub use rust_webvr::api::VRExternalShmemPtr;
pub use rust_webvr::VRMainThreadHeartbeat;
pub use rust_webvr::VRServiceManager;
pub use rust_webvr_api::VRService;

View file

@ -13,5 +13,5 @@ path = "lib.rs"
[dependencies]
ipc-channel = "0.11"
msg = {path = "../msg"}
rust-webvr-api = {version = "0.11.1", features = ["ipc"]}
rust-webvr-api = {version = "0.11.4", features = ["ipc"]}
serde = "1.0"