pixman: Branch 'master' - 3 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Thu Mar 1 20:53:06 PST 2012


 pixman/pixman-access.c     |    9 ---------
 pixman/pixman-accessor.h   |   15 ---------------
 pixman/pixman-bits-image.c |   28 ----------------------------
 pixman/pixman-noop.c       |   27 +++++++++++++++++++++++++++
 4 files changed, 27 insertions(+), 52 deletions(-)

New commits:
commit 999e72b80bd5e3fab5f45b6ad19511389b58d9ab
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Thu Mar 1 02:24:54 2012 -0500

    pixman-access.c: Remove some unused macros
    
    The macros related to palette entries:
    
    RGB15_TO_ENTRY,
    RGB24_TO_ENTRY,
    RGB24_TO_ENTRY_Y
    
    are not used anywhere.

diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 189b191..6743887 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -45,15 +45,6 @@
      (((s) >> 6) & 0x03e0) |                                            \
      (((s) >> 9) & 0x7c00))
 
-#define RGB15_TO_ENTRY(mif,rgb15)					\
-    ((mif)->ent[rgb15])
-
-#define RGB24_TO_ENTRY(mif,rgb24)					\
-    RGB15_TO_ENTRY (mif,CONVERT_RGB24_TO_RGB15 (rgb24))
-
-#define RGB24_TO_ENTRY_Y(mif,rgb24)					\
-    ((mif)->ent[CONVERT_RGB24_TO_Y15 (rgb24)])
-
 /* Fetch macros */
 
 #ifdef WORDS_BIGENDIAN
commit c0cb48aae0d09200a187965094138fbf488498cd
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Wed Feb 29 04:44:46 2012 -0500

    pixman-accessors.h: Delete unused macros
    
    The MEMCPY_WRAPPED and ACCESS macros are not used anymore.

diff --git a/pixman/pixman-accessor.h b/pixman/pixman-accessor.h
index 90c8ea7..8e0b036 100644
--- a/pixman/pixman-accessor.h
+++ b/pixman/pixman-accessor.h
@@ -1,21 +1,10 @@
 #ifdef PIXMAN_FB_ACCESSORS
 
-#define ACCESS(sym) sym##_accessors
-
 #define READ(img, ptr)							\
     (((bits_image_t *)(img))->read_func ((ptr), sizeof(*(ptr))))
 #define WRITE(img, ptr,val)						\
     (((bits_image_t *)(img))->write_func ((ptr), (val), sizeof (*(ptr))))
 
-#define MEMCPY_WRAPPED(img, dst, src, size)				\
-    do {								\
-	size_t _i;							\
-	uint8_t *_dst = (uint8_t*)(dst), *_src = (uint8_t*)(src);	\
-	for(_i = 0; _i < size; _i++) {					\
-	    WRITE((img), _dst +_i, READ((img), _src + _i));		\
-	}								\
-    } while (0)
-
 #define MEMSET_WRAPPED(img, dst, val, size)				\
     do {								\
 	size_t _i;							\
@@ -27,12 +16,8 @@
 
 #else
 
-#define ACCESS(sym) sym
-
 #define READ(img, ptr)		(*(ptr))
 #define WRITE(img, ptr, val)	(*(ptr) = (val))
-#define MEMCPY_WRAPPED(img, dst, src, size)				\
-    memcpy(dst, src, size)
 #define MEMSET_WRAPPED(img, dst, val, size)				\
     memset(dst, val, size)
 
commit 5adf569317f923cd5eb547209a8d927be0d81049
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Sun Feb 26 17:35:20 2012 -0500

    Move fetching for solid bits images to pixman-noop.c
    
    This should be a bit faster because it can reuse the scanline on each iteration.

diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 2f56de3..d105d2f 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -970,28 +970,6 @@ replicate_pixel_64 (bits_image_t *   bits,
 }
 
 static void
-bits_image_fetch_solid_32 (pixman_image_t * image,
-                           int              x,
-                           int              y,
-                           int              width,
-                           uint32_t *       buffer,
-                           const uint32_t * mask)
-{
-    replicate_pixel_32 (&image->bits, 0, 0, width, buffer);
-}
-
-static void
-bits_image_fetch_solid_64 (pixman_image_t * image,
-                           int              x,
-                           int              y,
-                           int              width,
-                           uint32_t *       b,
-                           const uint32_t * unused)
-{
-    replicate_pixel_64 (&image->bits, 0, 0, width, b);
-}
-
-static void
 bits_image_fetch_untransformed_repeat_none (bits_image_t *image,
                                             pixman_bool_t wide,
                                             int           x,
@@ -1131,12 +1109,6 @@ typedef struct
 
 static const fetcher_info_t fetcher_info[] =
 {
-    { PIXMAN_solid,
-      FAST_PATH_NO_ALPHA_MAP,
-      bits_image_fetch_solid_32,
-      bits_image_fetch_solid_64
-    },
-
     { PIXMAN_any,
       (FAST_PATH_NO_ALPHA_MAP			|
        FAST_PATH_ID_TRANSFORM			|
diff --git a/pixman/pixman-noop.c b/pixman/pixman-noop.c
index f4012d8..d835de6 100644
--- a/pixman/pixman-noop.c
+++ b/pixman/pixman-noop.c
@@ -76,6 +76,33 @@ noop_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter)
     {
 	iter->get_scanline = _pixman_iter_get_scanline_noop;
     }
+    else if (image->common.extended_format_code == PIXMAN_solid		&&
+	     ((image->common.flags & (FAST_PATH_BITS_IMAGE | FAST_PATH_NO_ALPHA_MAP)) ==
+	      (FAST_PATH_BITS_IMAGE | FAST_PATH_NO_ALPHA_MAP)))
+    {
+	bits_image_t *bits = &image->bits;
+
+	if (iter->flags & ITER_NARROW)
+	{
+	    uint32_t color = bits->fetch_pixel_32 (bits, 0, 0);
+	    uint32_t *buffer = iter->buffer;
+	    uint32_t *end = buffer + iter->width;
+
+	    while (buffer < end)
+		*(buffer++) = color;
+	}
+	else
+	{
+	    uint64_t color = bits->fetch_pixel_64 (bits, 0, 0);
+	    uint64_t *buffer = (uint64_t *)iter->buffer;
+	    uint64_t *end = buffer + iter->width;
+
+	    while (buffer < end)
+		*(buffer++) = color;
+	}
+
+	iter->get_scanline = _pixman_iter_get_scanline_noop;
+    }
     else if (image->common.extended_format_code == PIXMAN_a8r8g8b8	&&
 	     (iter->flags & ITER_NARROW)				&&
 	     (image->common.flags & FLAGS) == FLAGS			&&


More information about the xorg-commit mailing list