[Pixman] [PATCH 4/7] Eliminate the store_scanline_{32, 64} function pointers.

Søren Sandmann sandmann at daimi.au.dk
Thu Jul 29 07:12:45 PDT 2010


From: Søren Sandmann Pedersen <ssp at redhat.com>

Now that we can't recurse on alpha maps, they are not needed anymore.
---
 pixman/pixman-bits-image.c |   54 +++++++++++++-------------------------------
 pixman/pixman-private.h    |    4 ---
 2 files changed, 16 insertions(+), 42 deletions(-)

diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index 09b69df..f8ddcbc 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -36,13 +36,12 @@
 #include "pixman-combine32.h"
 
 /* Store functions */
-
-static void
-bits_image_store_scanline_32 (bits_image_t *  image,
-                              int             x,
-                              int             y,
-                              int             width,
-                              const uint32_t *buffer)
+void
+_pixman_image_store_scanline_32 (bits_image_t *  image,
+                                 int             x,
+                                 int             y,
+                                 int             width,
+                                 const uint32_t *buffer)
 {
     image->store_scanline_raw_32 (image, x, y, width, buffer);
 
@@ -51,16 +50,17 @@ bits_image_store_scanline_32 (bits_image_t *  image,
 	x -= image->common.alpha_origin_x;
 	y -= image->common.alpha_origin_y;
 
-	image->common.alpha_map->store_scanline_raw_32 (image->common.alpha_map, x, y, width, buffer);
+	image->common.alpha_map->store_scanline_raw_32 (
+	    image->common.alpha_map, x, y, width, buffer);
     }
 }
 
-static void
-bits_image_store_scanline_64 (bits_image_t *  image,
-                              int             x,
-                              int             y,
-                              int             width,
-                              const uint32_t *buffer)
+void
+_pixman_image_store_scanline_64 (bits_image_t *  image,
+                                 int             x,
+                                 int             y,
+                                 int             width,
+                                 const uint32_t *buffer)
 {
     image->store_scanline_raw_64 (image, x, y, width, buffer);
 
@@ -69,30 +69,11 @@ bits_image_store_scanline_64 (bits_image_t *  image,
 	x -= image->common.alpha_origin_x;
 	y -= image->common.alpha_origin_y;
 
-	image->common.alpha_map->store_scanline_raw_64 (image->common.alpha_map, x, y, width, buffer);
+	image->common.alpha_map->store_scanline_raw_64 (
+	    image->common.alpha_map, x, y, width, buffer);
     }
 }
 
-void
-_pixman_image_store_scanline_32 (bits_image_t *  image,
-                                 int             x,
-                                 int             y,
-                                 int             width,
-                                 const uint32_t *buffer)
-{
-    image->store_scanline_32 (image, x, y, width, buffer);
-}
-
-void
-_pixman_image_store_scanline_64 (bits_image_t *  image,
-                                 int             x,
-                                 int             y,
-                                 int             width,
-                                 const uint32_t *buffer)
-{
-    image->store_scanline_64 (image, x, y, width, buffer);
-}
-
 /* Fetch functions */
 
 static force_inline uint32_t
@@ -983,9 +964,6 @@ bits_image_property_changed (pixman_image_t *image)
 	image->common.get_scanline_64 = _pixman_image_get_scanline_generic_64;
 	image->common.get_scanline_32 = bits_image_fetch_general;
     }
-
-    bits->store_scanline_64 = bits_image_store_scanline_64;
-    bits->store_scanline_32 = bits_image_store_scanline_32;
 }
 
 static uint32_t *
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 06f6d11..15a5bc2 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -187,10 +187,6 @@ struct bits_image
     store_scanline_t           store_scanline_raw_32;
     store_scanline_t           store_scanline_raw_64;
 
-    /* Store a scanline, taking alpha maps into account */
-    store_scanline_t           store_scanline_32;
-    store_scanline_t           store_scanline_64;
-
     /* Used for indirect access to the bits */
     pixman_read_memory_func_t  read_func;
     pixman_write_memory_func_t write_func;
-- 
1.7.1.1



More information about the Pixman mailing list