mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add stub makeXRCompatible()
This commit is contained in:
parent
52b0d37bb7
commit
2af8e0ef9f
3 changed files with 14 additions and 1 deletions
|
@ -24,6 +24,7 @@ use crate::dom::htmlcanvaselement::utils as canvas_utils;
|
|||
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
|
||||
use crate::dom::htmliframeelement::HTMLIFrameElement;
|
||||
use crate::dom::node::{document_from_node, window_from_node, Node, NodeDamage};
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::webgl_extensions::WebGLExtensions;
|
||||
use crate::dom::webgl_validations::tex_image_2d::{
|
||||
CommonCompressedTexImage2DValidatorResult, CommonTexImage2DValidator,
|
||||
|
@ -76,6 +77,7 @@ use servo_config::pref;
|
|||
use std::cell::Cell;
|
||||
use std::cmp;
|
||||
use std::ptr::{self, NonNull};
|
||||
use std::rc::Rc;
|
||||
|
||||
// From the GLES 2.0.25 spec, page 85:
|
||||
//
|
||||
|
@ -4090,6 +4092,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
handle_potential_webgl_error!(self, self.validate_ownership(program), return None);
|
||||
handle_potential_webgl_error!(self, program.attached_shaders().map(Some), None)
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-webglrenderingcontextbase-makexrcompatible
|
||||
fn MakeXRCompatible(&self) -> Rc<Promise> {
|
||||
// XXXManishearth Fill in with compatibility checks when rust-webxr supports this
|
||||
let p = Promise::new(&self.global());
|
||||
p.resolve_native(&());
|
||||
p
|
||||
}
|
||||
}
|
||||
|
||||
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
||||
|
|
|
@ -44,4 +44,3 @@ interface XRSession : EventTarget {
|
|||
// attribute EventHandler onselectstart;
|
||||
// attribute EventHandler onselectend;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,3 +41,7 @@ interface XRWebGLLayer : XRLayer {
|
|||
// // Static Methods
|
||||
// static double getNativeFramebufferScaleFactor(XRSession session);
|
||||
};
|
||||
|
||||
partial interface WebGLRenderingContext {
|
||||
[Pref="dom.webxr.enabled"] Promise<void> makeXRCompatible();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue