aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/vrdisplay.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-01-07 15:24:26 -0800
committerManish Goregaokar <manishsmail@gmail.com>2019-01-07 15:24:26 -0800
commit90e87b97baa7bf9b57d72a562c98af3ed2b52e88 (patch)
tree2688689548a2df702a5a2005085edca494e8cc9e /components/script/dom/vrdisplay.rs
parent121cbd0078c5bd1693b040567e166a3ca55d7269 (diff)
downloadservo-90e87b97baa7bf9b57d72a562c98af3ed2b52e88.tar.gz
servo-90e87b97baa7bf9b57d72a562c98af3ed2b52e88.zip
Init XR present on XR::RequestSession() with empty context
Diffstat (limited to 'components/script/dom/vrdisplay.rs')
-rw-r--r--components/script/dom/vrdisplay.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index 896bd0d4f81..2115f7ef218 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -688,12 +688,12 @@ impl VRDisplay {
// XR stuff
// XXXManishearth eventually we should share as much logic as possible
impl VRDisplay {
- pub fn xr_present(&self, session: &XRSession, ctx: &WebGLRenderingContext) {
+ pub fn xr_present(&self, session: &XRSession, ctx: Option<&WebGLRenderingContext>) {
let layer_bounds = WebVRLayer::default();
self.xr_session.set(Some(session));
if self.presenting.get() {
*self.layer.borrow_mut() = layer_bounds;
- self.layer_ctx.set(Some(&ctx));
+ self.layer_ctx.set(ctx);
return;
}
@@ -709,7 +709,7 @@ impl VRDisplay {
if let Ok(()) = receiver.recv().unwrap() {
*self.layer.borrow_mut() = layer_bounds;
- self.layer_ctx.set(Some(&ctx));
+ self.layer_ctx.set(ctx);
self.init_present();
}
}