gl: Fix color differences at gradient boundaries 1.0_post
authorDongyeon Kim <dy5.kim@samsung.com>
Mon, 9 Jul 2012 00:41:28 +0000 (09:41 +0900)
committerDongyeon Kim <dy5.kim@samsung.com>
Mon, 9 Jul 2012 00:41:28 +0000 (09:41 +0900)
At gradient boundaries the color value differs from the expected value.
This is because Cairo uses [0.5, 0.5] as the pixel center.
Here we try to offset the differences.

debian/changelog
packaging/cairo.spec
src/cairo-gl-gradient.c

index c7c7318..3725e04 100644 (file)
@@ -1,4 +1,12 @@
-cairo (1.12.3-slp2+slp2+2) unstable; urgency=low
+cairo (1.12.3-slp2+3) unstable; urgency=low
+
+  * gl: Fix color differences at gradient boundaries
+  * Git: slp/unmodified/cairo.git
+  * Tag: cairo_1.12.3-slp2+3
+
+ -- Dongyeon Kim <dy5.kim@samsung.com>  Thu, 05 Jul 2012 10:10:35 +0900
+
+cairo (1.12.3-slp2+2) unstable; urgency=low
 
   * Update cairo gl/msaa compositor to latest
   * Git: unmodified/cairo.git
index 9059bf2..7980e65 100644 (file)
@@ -1,7 +1,7 @@
 Name:       cairo
 Summary:    A vector graphics library
 Version:    1.12.3
-Release:    2
+Release:    3
 Group:      System/Libraries
 License:    LGPLv2 or MPLv1.1
 URL:        http://www.cairographics.org
index 5ac172f..ffb5468 100644 (file)
@@ -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,