mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add makeXRCompatible for WebGL2, update WebXR WPT expectations (#33097)
* Add makeXRCompatible to WebGLRenderContextBase Signed-off-by: Daniel Adams <msub2official@gmail.com> * Activate webgl2 for webxr wpt, update meta expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update meta legacy layout expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove no longer existing expectations from meta files Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove files for fully passing tests Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove out-of-date expectations from meta legacy layout Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update webgl conformance expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix test numbering in expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
parent
280063eee2
commit
1ef3e107bd
115 changed files with 53 additions and 762 deletions
|
@ -5,6 +5,7 @@
|
|||
use std::cell::Cell;
|
||||
use std::cmp;
|
||||
use std::ptr::{self, NonNull};
|
||||
use std::rc::Rc;
|
||||
|
||||
use canvas_traits::webgl::WebGLError::*;
|
||||
use canvas_traits::webgl::{
|
||||
|
@ -42,6 +43,7 @@ use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
|
|||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutCanvasRenderingContextHelpers};
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::webgl_validations::tex_image_2d::{
|
||||
TexImage2DValidator, TexImage2DValidatorResult, TexStorageValidator, TexStorageValidatorResult,
|
||||
};
|
||||
|
@ -4471,6 +4473,14 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
|||
) {
|
||||
self.tex_storage(3, target, levels, internal_format, width, height, depth)
|
||||
}
|
||||
|
||||
/// <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
|
||||
}
|
||||
}
|
||||
|
||||
impl LayoutCanvasRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {
|
||||
|
|
|
@ -36,6 +36,6 @@ interface XRWebGLLayer: XRLayer {
|
|||
// static double getNativeFramebufferScaleFactor(XRSession session);
|
||||
};
|
||||
|
||||
partial interface WebGLRenderingContext {
|
||||
partial interface mixin WebGLRenderingContextBase {
|
||||
[Pref="dom.webxr.enabled"] Promise<undefined> makeXRCompatible();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue