aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglframebuffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r--components/script/dom/webglframebuffer.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs
index 029c794616c..44f9586adb1 100644
--- a/components/script/dom/webglframebuffer.rs
+++ b/components/script/dom/webglframebuffer.rs
@@ -190,11 +190,6 @@ 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 {
- texture: JS::from_ref(texture),
- level: level }
- );
-
// From the GLES 2.0.25 spec, page 113:
//
// "level specifies the mipmap level of the texture image
@@ -234,6 +229,11 @@ impl WebGLFramebuffer {
_ => return Err(WebGLError::InvalidOperation),
}
+ *binding.borrow_mut() = Some(WebGLFramebufferAttachment::Texture {
+ texture: JS::from_ref(texture),
+ level: level }
+ );
+
Some(texture.id())
}