From e46215ec6b94355b741acf5dfdd264d6396b4bc8 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 26 May 2010 18:44:20 +0200 Subject: [PATCH] gl: Remove unneeded and broken workaround We now ensure the values are properly zeroed when setting the operator. --- src/cairo-gl-composite.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c index e74d55535..809e51dd8 100644 --- a/src/cairo-gl-composite.c +++ b/src/cairo-gl-composite.c @@ -671,19 +671,7 @@ _cairo_gl_operand_setup_fixed (cairo_gl_operand_t *operand, glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_CONSTANT); break; case CAIRO_GL_OPERAND_TEXTURE: - /* Set up the constant color we use to set color to 0 if needed. */ - /* Force the mask color to 0 if the surface should be - * alpha-only. We may have a teximage with color bits if - * the implementation doesn't support GL_ALPHA FBOs. - */ - if (operand->texture.surface->base.content != CAIRO_CONTENT_ALPHA) { - glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_TEXTURE0 + tex_unit); - } else { - GLfloat constant_color[4] = {0.0, 0.0, 0.0, 0.0}; - - glTexEnvfv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, constant_color); - glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_CONSTANT); - } + glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_TEXTURE0 + tex_unit); glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_TEXTURE0 + tex_unit); break; break;