Eliminate the _pixman_image_store_scanline_32/64 functions
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 10 Dec 2010 17:31:29 +0000 (12:31 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 18 Jan 2011 17:42:25 +0000 (12:42 -0500)
They were only called from next_line_write_narrow/wide, so they could
simply be absorbed into those functions.

pixman/pixman-bits-image.c
pixman/pixman-private.h

index bcada58..bf22dbf 100644 (file)
 #include "pixman-private.h"
 #include "pixman-combine32.h"
 
-/* Store functions */
-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);
-
-    if (image->common.alpha_map)
-    {
-       x -= image->common.alpha_origin_x;
-       y -= image->common.alpha_origin_y;
-
-       image->common.alpha_map->store_scanline_32 (
-           image->common.alpha_map, 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);
-
-    if (image->common.alpha_map)
-    {
-       x -= image->common.alpha_origin_x;
-       y -= image->common.alpha_origin_y;
-
-       image->common.alpha_map->store_scanline_64 (
-           image->common.alpha_map, x, y, width, buffer);
-    }
-}
-
 /* Fetch functions */
 
 static force_inline uint32_t
@@ -1397,15 +1358,47 @@ dest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
 static void
 dest_write_back_narrow (pixman_iter_t *iter)
 {
-    _pixman_image_store_scanline_32 (
-       &iter->image->bits, iter->x, iter->y++, iter->width, iter->buffer);
+    bits_image_t *  image  = &iter->image->bits;
+    int             x      = iter->x;
+    int             y      = iter->y;
+    int             width  = iter->width;
+    const uint32_t *buffer = iter->buffer;
+
+    image->store_scanline_32 (image, x, y, width, buffer);
+
+    if (image->common.alpha_map)
+    {
+       x -= image->common.alpha_origin_x;
+       y -= image->common.alpha_origin_y;
+
+       image->common.alpha_map->store_scanline_32 (
+           image->common.alpha_map, x, y, width, buffer);
+    }
+
+    iter->y++;
 }
 
 static void
 dest_write_back_wide (pixman_iter_t *iter)
 {
-    _pixman_image_store_scanline_64 (
-       &iter->image->bits, iter->x, iter->y++, iter->width, iter->buffer);
+    bits_image_t *  image  = &iter->image->bits;
+    int             x      = iter->x;
+    int             y      = iter->y;
+    int             width  = iter->width;
+    const uint32_t *buffer = iter->buffer;
+
+    image->store_scanline_64 (image, x, y, width, buffer);
+
+    if (image->common.alpha_map)
+    {
+       x -= image->common.alpha_origin_x;
+       y -= image->common.alpha_origin_y;
+
+       image->common.alpha_map->store_scanline_64 (
+           image->common.alpha_map, x, y, width, buffer);
+    }
+
+    iter->y++;
 }
 
 void
index 853fb5a..d9d19ce 100644 (file)
@@ -258,23 +258,6 @@ _pixman_image_get_scanline_64 (pixman_image_t *image,
                                uint32_t *      buffer,
                                const uint32_t *unused);
 
-void
-_pixman_image_store_scanline_32 (bits_image_t *  image,
-                                 int             x,
-                                 int             y,
-                                 int             width,
-                                 const uint32_t *buffer);
-
-/* Even though the type of buffer is uint32_t *, the function
- * actually expects a uint64_t *buffer.
- */
-void
-_pixman_image_store_scanline_64 (bits_image_t *  image,
-                                 int             x,
-                                 int             y,
-                                 int             width,
-                                 const uint32_t *buffer);
-
 pixman_image_t *
 _pixman_image_allocate (void);