mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Init XR present on XR::RequestSession() with empty context
This commit is contained in:
parent
121cbd0078
commit
90e87b97ba
3 changed files with 10 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue