aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webglframebuffer.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs
index 8e22f17d079..029c794616c 100644
--- a/components/script/dom/webglframebuffer.rs
+++ b/components/script/dom/webglframebuffer.rs
@@ -21,7 +21,7 @@ use webrender_traits::{WebGLCommand, WebGLFramebufferBindingRequest, WebGLFrameb
#[derive(JSTraceable, Clone, HeapSizeOf)]
enum WebGLFramebufferAttachment {
Renderbuffer(JS<WebGLRenderbuffer>),
- Texture(JS<WebGLTexture>),
+ Texture { texture: JS<WebGLTexture>, level: i32 },
}
impl HeapGCValue for WebGLFramebufferAttachment {}
@@ -190,7 +190,10 @@ impl WebGLFramebuffer {
// Note, from the GLES 2.0.25 spec, page 113:
// "If texture is zero, then textarget and level are ignored."
Some(texture) => {
- *binding.borrow_mut() = Some(WebGLFramebufferAttachment::Texture(JS::from_ref(texture)));
+ *binding.borrow_mut() = Some(WebGLFramebufferAttachment::Texture {
+ texture: JS::from_ref(texture),
+ level: level }
+ );
// From the GLES 2.0.25 spec, page 113:
//
@@ -282,7 +285,7 @@ impl WebGLFramebuffer {
for attachment in &attachments {
let matched = {
match *attachment.borrow() {
- Some(WebGLFramebufferAttachment::Texture(ref att_texture))
+ Some(WebGLFramebufferAttachment::Texture { texture: ref att_texture, .. })
if texture.id() == att_texture.id() => true,
_ => false,
}