From 471924af626181e513432ab6367f712639adb567 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 5 May 2018 18:28:25 -0700 Subject: [PATCH] webgl: Add getParameter(UNPACK_PREMULTIPLY_ALPHA_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 c44578bbaf1..32059db6302 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1330,6 +1330,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { let unpack = self.texture_unpacking_settings.get(); return BooleanValue(unpack.contains(TextureUnpacking::FLIP_Y_AXIS)); } + constants::UNPACK_PREMULTIPLY_ALPHA_WEBGL => { + let unpack = self.texture_unpacking_settings.get(); + return BooleanValue(unpack.contains(TextureUnpacking::PREMULTIPLY_ALPHA)); + } _ => {} } 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 11484fc0167..87558e7b05a 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 #86: context.getParameter(context.UNPACK_PREMULTIPLY_ALPHA_WEBGL) should be false (of type boolean). Was null (of type object).] - expected: FAIL - [WebGL test #88: context.getParameter(context.VIEWPORT) is not an instance of Int32Array] expected: FAIL