From 8c052d3593bfce51f787f0f3db4cfe756a6510ed Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 5 May 2018 18:27:57 -0700 Subject: [PATCH] webgl: Add getParameter(UNPACK_FlIP_Y_WEBGL) support. --- components/script/dom/webglrenderingcontext.rs | 4 ++++ .../conformance-1.0.3/conformance/state/gl-get-calls.html.ini | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 17c63a78d48..c44578bbaf1 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1326,6 +1326,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { "WebGL GLSL ES 1.0".to_jsval(cx, rval.handle_mut()); return rval.get(); } + constants::UNPACK_FLIP_Y_WEBGL => { + let unpack = self.texture_unpacking_settings.get(); + return BooleanValue(unpack.contains(TextureUnpacking::FLIP_Y_AXIS)); + } _ => {} } diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini index 5fb34fccbb5..11484fc0167 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini @@ -57,9 +57,6 @@ [WebGL test #47: context.getParameter(context.SCISSOR_TEST) should be false (of type boolean). Was null (of type object).] expected: FAIL - [WebGL test #85: context.getParameter(context.UNPACK_FLIP_Y_WEBGL) should be false (of type boolean). Was null (of type object).] - expected: FAIL - [WebGL test #86: context.getParameter(context.UNPACK_PREMULTIPLY_ALPHA_WEBGL) should be false (of type boolean). Was null (of type object).] expected: FAIL