pixman: Branch '0.18' - 4 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Sun Aug 15 19:44:54 PDT 2010


 pixman/pixman-access.c     |    2 +-
 pixman/pixman-bits-image.c |    1 +
 pixman/pixman-compiler.h   |    9 ++++++++-
 pixman/pixman.c            |    4 ++--
 test/blitters-test.c       |    2 +-
 5 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 32509aa4da83565a1283375c7043348c63ac3d3a
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Mon Jul 12 15:13:49 2010 -0400

    Check for read accessors before taking the bilinear fast path
    
    The bilinear fast path accesses pixels directly, so if the image has a
    read accessor, then it can't be used.

diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 3d78ff0..0225ae5 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -914,6 +914,7 @@ bits_image_property_changed (pixman_image_t *image)
 	     bits->common.transform->matrix[2][2] == pixman_fixed_1	&&
 	     bits->common.transform->matrix[0][0] > 0			&&
 	     bits->common.transform->matrix[1][0] == 0			&&
+	     !bits->read_func						&&
 	     (bits->common.filter == PIXMAN_FILTER_BILINEAR ||
 	      bits->common.filter == PIXMAN_FILTER_GOOD	    ||
 	      bits->common.filter == PIXMAN_FILTER_BEST)		&&
commit 052c5b819cfcdc5e63adb5b9117db939674ca5c2
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Wed Jul 28 03:17:35 2010 -0400

    If we bail out of do_composite, make sure to undo any workarounds.
    
    The workaround for an old X bug has to be undone if we bail from
    do_composite, so we can't just return.

diff --git a/pixman/pixman.c b/pixman/pixman.c
index 56c9536..548242b 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -634,7 +634,7 @@ do_composite (pixman_implementation_t *imp,
 	    &region, src, mask, dest,
 	    src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height))
     {
-	return;
+	goto out;
     }
     
     extents = pixman_region32_extents (&region);
@@ -651,7 +651,7 @@ do_composite (pixman_implementation_t *imp,
      */
     op = optimize_operator (op, src_flags, mask_flags, dest_flags);
     if (op == PIXMAN_OP_DST)
-	return;
+	goto out;
 
     /* Check cache for fast paths */
     cache = PIXMAN_GET_THREAD_LOCAL (fast_path_cache);
commit 91cb1421770a7d654555069946f9e998999a5813
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Sun May 30 16:52:09 2010 -0400

    When storing a g1 pixel, store the lowest bit, rather than comparing with 0.

diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index fa0a267..b65ef66 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2640,7 +2640,7 @@ store_scanline_g1 (bits_image_t *  image,
 #else
 	mask = 1 << ((i + x) & 0x1f);
 #endif
-	v = RGB24_TO_ENTRY_Y (indexed, values[i]) ? mask : 0;
+	v = RGB24_TO_ENTRY_Y (indexed, values[i]) & 0x1 ? mask : 0;
 	
 	WRITE (image, pixel, (READ (image, pixel) & ~mask) | v);
     }
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 18f871e..1ebf6d9 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -482,7 +482,7 @@ main (int argc, char *argv[])
 	    /* Predefined value for running with all the fastpath functions
 	       disabled. It needs to be updated every time when changes are
 	       introduced to this program or behavior of pixman changes! */
-	    if (crc == 0x8F9F7DC1)
+	    if (crc == 0xBBACC28D)
 	    {
 		printf ("blitters test passed\n");
 	    }
commit a9a084c85cc0da15bfdf15a0a8363dd24c77f023
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Wed Jun 30 02:31:10 2010 -0400

    Fix memory leak in the pthreads thread local storage code
    
    When a thread exits, we leak whatever is stored in thread local
    variables, so install a destructor to free it.

diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
index 1a1350d..26f7071 100644
--- a/pixman/pixman-compiler.h
+++ b/pixman/pixman-compiler.h
@@ -158,9 +158,16 @@ extern __stdcall int ReleaseMutex (void *);
     static pthread_key_t tls_ ## name ## _key;				\
 									\
     static void								\
+    tls_ ## name ## _destroy_value (void *value)			\
+    {									\
+	free (value);							\
+    }									\
+									\
+    static void								\
     tls_ ## name ## _make_key (void)					\
     {									\
-	pthread_key_create (&tls_ ## name ## _key, NULL);		\
+	pthread_key_create (&tls_ ## name ## _key,			\
+			    tls_ ## name ## _destroy_value);		\
     }									\
 									\
     static type *							\


More information about the xorg-commit mailing list