Skip to content

Commit

Permalink
webgl: Drop a silly check for 0 in GetTexParameter.
Browse files Browse the repository at this point in the history
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 5f2d512
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/script/dom/webglrenderingcontext.rs
Expand Up @@ -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
Expand Down

0 comments on commit 5f2d512

Please sign in to comment.