diff options
author | Eric Anholt <eric@anholt.net> | 2016-10-06 23:15:42 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-10-25 22:19:29 -0700 |
commit | 71d266052b09c031707139466163a7087f0acc19 (patch) | |
tree | dbafeed70ceb3cc9339bc5e078c1db7faa8bc89e /components/script/dom/webglframebuffer.rs | |
parent | dba7d5eb51b5eb433f47a948f66df77920b06191 (diff) | |
download | servo-71d266052b09c031707139466163a7087f0acc19.tar.gz servo-71d266052b09c031707139466163a7087f0acc19.zip |
webgl: Re-check FBO status on binding an FBO.
When the FBO has been unbound, anything that happened to its
attachments (deletion, new binding, reallocation) may have caused it
to change status.
This doesn't change any test results currently, because we're not
checking if the attachments are deleted, the wrong size, or have
appropriate formats.
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r-- | components/script/dom/webglframebuffer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index 0211a0bc31f..8e22f17d079 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -89,6 +89,11 @@ impl WebGLFramebuffer { } pub fn bind(&self, target: u32) { + // Update the framebuffer status on binding. It may have + // changed if its attachments were resized or deleted while + // we've been unbound. + self.update_status(); + self.target.set(Some(target)); let cmd = WebGLCommand::BindFramebuffer(target, WebGLFramebufferBindingRequest::Explicit(self.id)); self.renderer.send(CanvasMsg::WebGL(cmd)).unwrap(); |