summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-26 18:44:20 +0200
committerBenjamin Otte <otte@redhat.com>2010-06-07 13:37:47 +0200
commite46215ec6b94355b741acf5dfdd264d6396b4bc8 (patch)
treedbd3868d05f977963f7b750455e99dfc979db7c0
parentb2d709b5c7e463437189b8e4a2c53a3317437825 (diff)
gl: Remove unneeded and broken workaround
We now ensure the values are properly zeroed when setting the operator.
-rw-r--r--src/cairo-gl-composite.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index e74d5553..809e51dd 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;