Skip to content
Permalink
Browse files

webgl: Drop a silly check for 0 in GetTexParameter.

0 is not among the valid values for a wrap mode or filter, so it won't
ever be returned unless the driver is broken, and even if it was a
valid value we would want to pass it through.
  • Loading branch information
anholt committed May 6, 2018
1 parent 719e4e3 commit 5f2d512c12b6158af22502cb09f3543ff015d864
Showing with 1 addition and 7 deletions.
  1. +1 −7 components/script/dom/webglrenderingcontext.rs
@@ -1412,13 +1412,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetTexParameter(target, pname, sender));

match receiver.recv().unwrap() {
value if value != 0 => Int32Value(value),
_ => {
self.webgl_error(InvalidEnum);
NullValue()
}
}
Int32Value(receiver.recv().unwrap())
}

// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3

0 comments on commit 5f2d512

Please sign in to comment.
You can’t perform that action at this time.