aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2018-09-18 11:48:34 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2018-09-18 11:48:34 +0200
commit900c3cc6b526616d35994fda526e7166f13cd12d (patch)
tree0889ba66098647dbc69b8ea11e8cd833fef2ecfc /components/script
parentfe6f53ffb48a62dc8917c5c285e8e6b5626b8d69 (diff)
downloadservo-900c3cc6b526616d35994fda526e7166f13cd12d.tar.gz
servo-900c3cc6b526616d35994fda526e7166f13cd12d.zip
Implement gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webglrenderingcontext.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index ac2ef4ea218..fadfb42f668 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -1235,7 +1235,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
constants::UNPACK_ALIGNMENT => {
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