summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-06-02 18:14:28 +0200
committerBenjamin Otte <otte@redhat.com>2010-06-07 13:37:48 +0200
commit19c1d8316e22fc37c7cdaf6c3e56519c06d10561 (patch)
tree3e9e2ccabf96eadecdb29f2577312ebaabf5d7c2
parent1f249064cc5c19a39ffe0faaa8825c8f8b6a2175 (diff)
gl: Special case blend mode for CAIRO_CONTENT_COLOR
This ensures that alpha stays at 1 for RGB in all cases.
-rw-r--r--src/cairo-gl-composite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 04701576..bc222b7d 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -882,6 +882,8 @@ _cairo_gl_set_operator (cairo_gl_context_t *ctx,
if (ctx->current_target->base.content == CAIRO_CONTENT_ALPHA) {
glBlendFuncSeparate (GL_ZERO, GL_ZERO, src_factor, dst_factor);
+ } else if (ctx->current_target->base.content == CAIRO_CONTENT_COLOR) {
+ glBlendFuncSeparate (src_factor, dst_factor, GL_ONE, GL_ONE);
} else {
glBlendFunc (src_factor, dst_factor);
}