pixman: Branch 'master' - 3 commits

Andrea Canciani ranma42 at kemper.freedesktop.org
Fri Nov 12 08:34:30 PST 2010


 pixman/pixman-image.c   |   19 ++++++++++++++++---
 pixman/pixman-private.h |    1 -
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit da0176e8534e5b027818f6b695343d3e04130a93
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Nov 2 17:04:35 2010 +0100

    Improve conical gradients opacity check
    
    Conical gradients are completely opaque if all of their stops are
    opaque and the repeat mode is not 'none'.

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index e78b139..28dc066 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -413,6 +413,7 @@ compute_image_info (pixman_image_t *image)
 
 	/* Fall through */
 
+    case CONICAL:
     case LINEAR:
 	code = PIXMAN_unknown;
 
commit 151f2554fc9c098ff86b0fdc0d785aa3ff496328
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Nov 2 17:02:01 2010 +0100

    Fix opacity check
    
    Radial gradients are "conical", thus they can have some non-opaque
    parts even if all of their stops are completely opaque.
    
    To guarantee that a radial gradient is actually opaque, it needs to
    also have one of the two circles containing the other one. In this
    case when extrapolating, the whole plane is completely covered (as
    explained in the comment in pixman-radial-gradient.c).

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index c9420c3..e78b139 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -398,10 +398,24 @@ compute_image_info (pixman_image_t *image)
 	    flags &= ~FAST_PATH_NARROW_FORMAT;
 	break;
 
-    case LINEAR:
     case RADIAL:
 	code = PIXMAN_unknown;
 
+	/*
+	 * As explained in pixman-radial-gradient.c, every point of
+	 * the plane has a valid associated radius (and thus will be
+	 * colored) if and only if a is negative (i.e. one of the two
+	 * circles contains the other one).
+	 */
+
+        if (image->radial.a >= 0)
+	    break;
+
+	/* Fall through */
+
+    case LINEAR:
+	code = PIXMAN_unknown;
+
 	if (image->common.repeat != PIXMAN_REPEAT_NONE)
 	{
 	    int i;
commit 19ed415b74521ad5dcc7b6e3ed4bb644711c7bef
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sun Oct 31 16:59:45 2010 +0100

    Remove unused stop_range field

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 636c076..c9420c3 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -47,8 +47,6 @@ _pixman_init_gradient (gradient_t *                  gradient,
 
     gradient->n_stops = n_stops;
 
-    gradient->stop_range = 0xffff;
-
     return TRUE;
 }
 
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index b37d9c8..383748a 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -121,7 +121,6 @@ struct gradient
     image_common_t	    common;
     int                     n_stops;
     pixman_gradient_stop_t *stops;
-    int                     stop_range;
 };
 
 struct linear_gradient


More information about the xorg-commit mailing list