From 23c6e1d2c007cc661b31e1bcdfd84604d7a9a560 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Fri, 10 Dec 2010 12:31:29 -0500 Subject: [PATCH] Eliminate the _pixman_image_store_scanline_32/64 functions 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 bcada58..bf22dbf 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 @@ -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 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); -- 2.7.4