mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update WebXR Layer IDL, and matching changes to the Rust code.
This commit is contained in:
parent
092dcaf2e6
commit
bf7f4eae31
13 changed files with 235 additions and 325 deletions
|
@ -5,7 +5,6 @@
|
|||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants;
|
||||
use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLRenderingContext;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
|
@ -141,13 +140,9 @@ impl WebGLFramebuffer {
|
|||
// https://github.com/servo/servo/issues/24498
|
||||
pub fn maybe_new_webxr(
|
||||
session: &XRSession,
|
||||
context: &XRWebGLRenderingContext,
|
||||
context: &WebGLRenderingContext,
|
||||
size: Size2D<i32, Viewport>,
|
||||
) -> Option<DomRoot<Self>> {
|
||||
let context = match context {
|
||||
XRWebGLRenderingContext::WebGLRenderingContext(ref ctx) => DomRoot::from_ref(&**ctx),
|
||||
XRWebGLRenderingContext::WebGL2RenderingContext(ref ctx) => ctx.base_context(),
|
||||
};
|
||||
let framebuffer = Self::maybe_new(&*context)?;
|
||||
framebuffer.size.set(Some((size.width, size.height)));
|
||||
framebuffer.status.set(constants::FRAMEBUFFER_COMPLETE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue