diff options
author | Josh Matthews <josh@joshmatthews.net> | 2018-08-01 15:40:46 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2018-08-01 15:40:46 -0400 |
commit | 3334e477c184bba409a280b104e60cc7107a5a15 (patch) | |
tree | 22066a60e74a5e15e9a38bd0e7bb19b334f20610 /components/script | |
parent | 733552d997f67a5bcd4ccb3930081fdea8990bfe (diff) | |
download | servo-3334e477c184bba409a280b104e60cc7107a5a15.tar.gz servo-3334e477c184bba409a280b104e60cc7107a5a15.zip |
webgl: Mark zero-sized framebuffers as incomplete attachments.
Diffstat (limited to 'components/script')
-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); } |