From 05b18fc09af0e0887c652bd482d68f00bec6d4d7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 4 Feb 2010 00:12:58 -0800 Subject: [PATCH] [gl] Fix create_gradient_texture to premultiply alpha. --- src/cairo-gl-surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index 5340c4176..cffd09590 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -1025,6 +1025,9 @@ _cairo_gl_create_gradient_texture (cairo_gl_context_t *ctx, cairo_pattern_get_color_stop_rgba (&pattern->base, i, &offset, &r, &g, &b, &a); + r = r * a; + g = g * a; + b = b * a; stop_index = (stops[i].offset - *first_offset) / delta_offsets * tex_width; if (stop_index == tex_width) stop_index = tex_width - 1;