FW: [patch] gl: disable GL_DITHER

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E434BC827@sisaex01sj>
re-post patch
________________________________________
From: Henry (Yu) Song - SISA
Sent: Tuesday, January 29, 2013 9:30 AM
To: [email protected]
Subject: [patch] gl: disable GL_DITHER

gl: disable GL_DITHER

Leaving GL_DITHER enabled (by default) causes color pixel mismatch on 
some drivers by comparing uploading then glReadPixels and original image



From 08cbdc9127b8638d04f70f36545f08965fe631db Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Tue, 29 Jan 2013 09:26:43 -0800
Subject: [PATCH] gl: disable GL_DITHER - GL_DITHER is enabled by default by
 spec. GL_DITHER causes color dithering before written to
 color buffer on some drivers.

---
 src/cairo-gl-device.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index 22297b3..b30c49c 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -725,6 +725,8 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx,
 #endif
     }

+    glDisable (GL_DITHER);
+
     glViewport (0, 0, surface->width, surface->height);

     if (_cairo_gl_surface_is_texture (surface))
--
1.7.9.5
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.