aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglframebuffer.rs
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2020-07-31 18:44:57 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2020-08-03 12:37:01 -0500
commitbf7f4eae31f0332b0ab8460132c937f8facbed47 (patch)
tree85ccb6a32b1ae33cada701ca96b47aff19bb477d /components/script/dom/webglframebuffer.rs
parent092dcaf2e6ec2ed4bc197991b46addf0752214a7 (diff)
downloadservo-bf7f4eae31f0332b0ab8460132c937f8facbed47.tar.gz
servo-bf7f4eae31f0332b0ab8460132c937f8facbed47.zip
Update WebXR Layer IDL, and matching changes to the Rust code.
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r--components/script/dom/webglframebuffer.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs
index a0d8025a131..9539ac90507 100644
--- a/components/script/dom/webglframebuffer.rs
+++ b/components/script/dom/webglframebuffer.rs
@@ -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);