diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-09-13 15:16:29 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-09-13 22:04:29 +0200 |
commit | ac822ee2fc4dbb4e67ec0587aba0ff32c7346c66 (patch) | |
tree | 0b7ca3c13dc8236cf8ac2f9d7d7332c7ecd90799 /components/script/dom/webglrenderingcontext.rs | |
parent | 9db1a5cd0b0de58d5f6539dfc529c3de8e15d2cb (diff) | |
download | servo-ac822ee2fc4dbb4e67ec0587aba0ff32c7346c66.tar.gz servo-ac822ee2fc4dbb4e67ec0587aba0ff32c7346c66.zip |
Remove erroneous check from CopyTexImage2D
The internal format of the bound texture doesn't matter, what matters is
which components can be found in the framebuffer.
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 94ec89b2b1c..eb7be0019e9 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1752,22 +1752,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { Err(_) => return, }; - let image_info = texture.image_info_for_target(&target, level); - - // The color buffer components can be dropped during the conversion to - // the internal_format, but new components cannot be added. - // - // Note that this only applies if we're copying to an already - // initialized texture. - // - // GL_INVALID_OPERATION is generated if the color buffer cannot be - // converted to the internal_format. - if let Some(old_internal_format) = image_info.internal_format() { - if old_internal_format.components() > internal_format.components() { - return self.webgl_error(InvalidOperation); - } - } - // NB: TexImage2D depth is always equal to 1 handle_potential_webgl_error!(self, texture.initialize(target, width as u32, |