pixman: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Sat Aug 21 03:32:50 PDT 2010


 pixman/pixman.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 393ccab74e9aa466e2fdd91319012e2c18f4ef84
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Mon Aug 16 07:24:48 2010 -0400

    Only try to compute the FAST_SAMPLES_COVER_CLIP for bits images
    
    It doesn't make sense in other cases, and the computation would make
    use of image->bits.{width,height} which lead to uninitialized memory
    accesses when the image wasn't of type BITS.

diff --git a/pixman/pixman.c b/pixman/pixman.c
index 55c5981..ddd4935 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -787,14 +787,17 @@ analyze_extent (pixman_image_t *image, int x, int y,
     if (!compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height))
 	return FALSE;
 
-    /* Check whether the non-expanded, transformed extent is entirely within
-     * the source image, and set the FAST_PATH_SAMPLES_COVER_CLIP if it is.
-     */
-    ex = *extents;
-    if (compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height))
+    if (image->type == BITS)
     {
-	if (ex.x1 >= 0 && ex.y1 >= 0 && ex.x2 <= image->bits.width && ex.y2 <= image->bits.height)
-	    *flags |= FAST_PATH_SAMPLES_COVER_CLIP;
+	/* Check whether the non-expanded, transformed extent is entirely within
+	 * the source image, and set the FAST_PATH_SAMPLES_COVER_CLIP if it is.
+	 */
+	ex = *extents;
+	if (compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height))
+	{
+	    if (ex.x1 >= 0 && ex.y1 >= 0 && ex.x2 <= image->bits.width && ex.y2 <= image->bits.height)
+		*flags |= FAST_PATH_SAMPLES_COVER_CLIP;
+	}
     }
 
     return TRUE;


More information about the xorg-commit mailing list