[Pixman] [PATCH 03/15] Eliminate the _pixman_image_store_scanline_32/64 functions.
Søren Sandmann
sandmann at cs.au.dk
Sat Jan 8 03:21:47 PST 2011
From: Søren Sandmann Pedersen <ssp at redhat.com>
They were only called from next_line_write_narrow/wide, so they could
simply be absorbed into those functions.
---
pixman/pixman-bits-image.c | 79 ++++++++++++++++++++------------------------
pixman/pixman-private.h | 17 ---------
2 files changed, 36 insertions(+), 60 deletions(-)
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index e0a6645..0c5f4e4 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -35,45 +35,6 @@
#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
@@ -1399,15 +1360,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
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 853fb5a..d9d19ce 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -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);
--
1.6.0.6
More information about the Pixman
mailing list