Implement gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)

This commit is contained in:
Anthony Ramine 2018-09-18 11:48:34 +02:00
parent fe6f53ffb4
commit 900c3cc6b5
2 changed files with 9 additions and 12 deletions

View file

@ -1235,7 +1235,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
constants::UNPACK_ALIGNMENT => { constants::UNPACK_ALIGNMENT => {
return UInt32Value(self.texture_unpacking_alignment.get()); return UInt32Value(self.texture_unpacking_alignment.get());
}, },
_ => {} constants::UNPACK_COLORSPACE_CONVERSION_WEBGL => {
let unpack = self.texture_unpacking_settings.get();
return UInt32Value(if unpack.contains(TextureUnpacking::CONVERT_COLORSPACE) {
constants::BROWSER_DEFAULT_WEBGL
} else {
constants::NONE
});
},
_ => {},
} }
// Handle any MAX_ parameters by retrieving the limits that were stored // Handle any MAX_ parameters by retrieving the limits that were stored

View file

@ -1,11 +0,0 @@
[webgl-specific.html]
bug: https://github.com/servo/servo/issues/20552
[WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : set/get UNPACK_COLORSPACE_CONVERSION_WEBGL should generate no error]
expected: FAIL
[WebGL test #23: gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) should be 37444 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #24: gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) should be 0 (of type number). Was null (of type object).]
expected: FAIL