aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xrwebgllayer.rs
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2020-07-29 17:06:45 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2020-07-29 17:14:51 -0500
commitdfc641d64841bab44cdca2cba0009901416f78f6 (patch)
tree52959338cee741e150b8001de851ef062ca0503f /components/script/dom/xrwebgllayer.rs
parent0d77e0f6cfe889efdf5b00c9fc729fcceb0899d8 (diff)
downloadservo-dfc641d64841bab44cdca2cba0009901416f78f6.tar.gz
servo-dfc641d64841bab44cdca2cba0009901416f78f6.zip
Don't delete GL textures created by WebXR
Diffstat (limited to 'components/script/dom/xrwebgllayer.rs')
-rw-r--r--components/script/dom/xrwebgllayer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/xrwebgllayer.rs b/components/script/dom/xrwebgllayer.rs
index e0b4a558c8c..539c96770f3 100644
--- a/components/script/dom/xrwebgllayer.rs
+++ b/components/script/dom/xrwebgllayer.rs
@@ -229,7 +229,7 @@ impl XRWebGLLayer {
// TODO: Cache this texture
let color_texture_id =
WebGLTextureId::maybe_new(sub_images.sub_image.as_ref()?.color_texture)?;
- let color_texture = WebGLTexture::new(context, color_texture_id);
+ let color_texture = WebGLTexture::new_webxr(context, color_texture_id);
let target = self.texture_target();
// Save the current bindings
@@ -263,7 +263,7 @@ impl XRWebGLLayer {
if let Some(id) = sub_images.sub_image.as_ref()?.depth_stencil_texture {
// TODO: Cache this texture
let depth_stencil_texture_id = WebGLTextureId::maybe_new(id)?;
- let depth_stencil_texture = WebGLTexture::new(context, depth_stencil_texture_id);
+ let depth_stencil_texture = WebGLTexture::new_webxr(context, depth_stencil_texture_id);
framebuffer
.texture2d_even_if_opaque(
constants::DEPTH_STENCIL_ATTACHMENT,