[cairo-commit] src/cairo-gl-gradient.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jul 10 08:15:32 PDT 2012
src/cairo-gl-gradient.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 64a236246bf4276606ce69c79702f15373c5425d
Author: Henry Song <henry.song at samsung.com>
Date: Tue Jul 10 16:12:25 2012 +0100
gl: generate correct gradient color texture
Pixman generates gradient color at the center of pixel. We need to
adjust such accordingly in GL when generating gradient texture
diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
index 5ac172f..ffb5468 100644
--- a/src/cairo-gl-gradient.c
+++ b/src/cairo-gl-gradient.c
@@ -124,9 +124,9 @@ _cairo_gl_gradient_render (const cairo_gl_context_t *ctx,
pixman_stops[i].color.alpha = stops[i].color.alpha_short;
}
- p1.x = 0;
+ p1.x = _cairo_fixed_16_16_from_double (0.5);
p1.y = 0;
- p2.x = width << 16;
+ p2.x = _cairo_fixed_16_16_from_double (width - 0.5);
p2.y = 0;
gradient = pixman_image_create_linear_gradient (&p1, &p2,
More information about the cairo-commit
mailing list