diff options
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r-- | components/script/dom/webglframebuffer.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index f71a2104cf5..2d9e567d9bf 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -175,7 +175,11 @@ impl WebGLFramebuffer { self.size.set(fb_size); if has_c || has_z || has_zs || has_s { - self.status.set(constants::FRAMEBUFFER_COMPLETE); + if self.size.get().map_or(false, |(w, h)| w != 0 && h != 0) { + self.status.set(constants::FRAMEBUFFER_COMPLETE); + } else { + self.status.set(constants::FRAMEBUFFER_INCOMPLETE_ATTACHMENT); + } } else { self.status.set(constants::FRAMEBUFFER_UNSUPPORTED); } |