pixman: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Fri Jun 22 10:41:02 PDT 2007


 pixman/pixman-image.c   |   31 ++-----------------------------
 pixman/pixman-private.h |    1 -
 2 files changed, 2 insertions(+), 30 deletions(-)

New commits:
diff-tree 2e61f30e4c8d0e01e175495e13a5f132521ad6f2 (from 64e3146c5ddfad415663fa5f87f7b9ff327a8c56)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Fri Jun 22 13:37:46 2007 -0400

    Revert "Add a cache of images to reduce malloc/free time"
    
    Revert the image cache since it isn't thread safe.
    
    This reverts commit deb09d769ae4fc55cde595c170f417692284b3e8.

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 3cc6b8d..f22d2c0 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -69,37 +69,10 @@ color_to_uint32 (const pixman_color_t *c
 	(color->blue >> 8);
 }
 
-static pixman_image_t *image_cache;
-
-static pixman_image_t *
-new_image (void)
-{
-    pixman_image_t *image;
-
-    if (image_cache)
-    {
-	image = image_cache;
-	image_cache = image->next;
-    }
-    else
-    {
-	image = malloc (sizeof (pixman_image_t));
-    }
-
-    return image;
-}
-
-static void
-delete_image (pixman_image_t *image)
-{
-    image->next = image_cache;
-    image_cache = image;
-}
-
 static pixman_image_t *
 allocate_image (void)
 {
-    pixman_image_t *image = new_image();
+    pixman_image_t *image = malloc (sizeof (pixman_image_t));
     
     if (image)
     {
@@ -172,7 +145,7 @@ pixman_image_unref (pixman_image_t *imag
 	if (image->type == BITS && image->bits.free_me)
 	    free (image->bits.free_me);
 	
-	delete_image (image);
+	free (image);
     }
 }
 
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index d10d7ad..9b89dee 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -260,7 +260,6 @@ union pixman_image
     conical_gradient_t		conical;
     radial_gradient_t		radial;
     solid_fill_t		solid;
-    pixman_image_t             *next;	/* Used in the image cache */
 };
 
 #define LOG2_BITMAP_PAD 5


More information about the xorg-commit mailing list