[cairo] FW: [patch] gl: disable GL_DITHER
Henry (Yu) Song - SISA
hsong at sisa.samsung.com
Thu Feb 14 11:22:45 PST 2013
re-post patch
________________________________________
From: Henry (Yu) Song - SISA
Sent: Tuesday, January 29, 2013 9:30 AM
To: cairo at cairographics.org
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 <henry.song at samsung.com>
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
More information about the cairo
mailing list