[Pixman] [PATCH 5/7] Remove "_raw_" from all the accessors.
Søren Sandmann
sandmann at daimi.au.dk
Thu Jul 29 07:12:46 PDT 2010
From: Søren Sandmann Pedersen <ssp at redhat.com>
There are no non-raw accessors anymore.
---
pixman/pixman-access.c | 40 ++++++++++++++++++++--------------------
pixman/pixman-bits-image.c | 28 ++++++++++++++--------------
pixman/pixman-private.h | 19 +++++++------------
3 files changed, 41 insertions(+), 46 deletions(-)
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 80fa9e8..a786947 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2667,7 +2667,7 @@ store_scanline_generic_64 (bits_image_t * image,
*/
pixman_contract (argb8_pixels, (uint64_t *)values, width);
- image->store_scanline_raw_32 (image, x, y, width, argb8_pixels);
+ image->store_scanline_32 (image, x, y, width, argb8_pixels);
free (argb8_pixels);
}
@@ -2688,7 +2688,7 @@ fetch_scanline_generic_64 (pixman_image_t *image,
/* Fetch the pixels into the first half of buffer and then expand them in
* place.
*/
- image->bits.fetch_scanline_raw_32 (image, x, y, width, buffer, NULL);
+ image->bits.fetch_scanline_32 (image, x, y, width, buffer, NULL);
format = image->bits.format;
if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_COLOR ||
@@ -2711,7 +2711,7 @@ fetch_pixel_generic_64 (bits_image_t *image,
int offset,
int line)
{
- uint32_t pixel32 = image->fetch_pixel_raw_32 (image, offset, line);
+ uint32_t pixel32 = image->fetch_pixel_32 (image, offset, line);
uint64_t result;
pixman_format_code_t format;
@@ -2743,7 +2743,7 @@ fetch_pixel_generic_lossy_32 (bits_image_t *image,
int offset,
int line)
{
- uint64_t pixel64 = image->fetch_pixel_raw_64 (image, offset, line);
+ uint64_t pixel64 = image->fetch_pixel_64 (image, offset, line);
uint32_t result;
pixman_contract (&result, &pixel64, 1);
@@ -2754,12 +2754,12 @@ fetch_pixel_generic_lossy_32 (bits_image_t *image,
typedef struct
{
pixman_format_code_t format;
- fetch_scanline_t fetch_scanline_raw_32;
- fetch_scanline_t fetch_scanline_raw_64;
- fetch_pixel_32_t fetch_pixel_raw_32;
- fetch_pixel_64_t fetch_pixel_raw_64;
- store_scanline_t store_scanline_raw_32;
- store_scanline_t store_scanline_raw_64;
+ fetch_scanline_t fetch_scanline_32;
+ fetch_scanline_t fetch_scanline_64;
+ fetch_pixel_32_t fetch_pixel_32;
+ fetch_pixel_64_t fetch_pixel_64;
+ store_scanline_t store_scanline_32;
+ store_scanline_t store_scanline_64;
} format_info_t;
#define FORMAT_INFO(format) \
@@ -2885,12 +2885,12 @@ setup_accessors (bits_image_t *image)
{
if (info->format == image->format)
{
- image->fetch_scanline_raw_32 = info->fetch_scanline_raw_32;
- image->fetch_scanline_raw_64 = info->fetch_scanline_raw_64;
- image->fetch_pixel_raw_32 = info->fetch_pixel_raw_32;
- image->fetch_pixel_raw_64 = info->fetch_pixel_raw_64;
- image->store_scanline_raw_32 = info->store_scanline_raw_32;
- image->store_scanline_raw_64 = info->store_scanline_raw_64;
+ image->fetch_scanline_32 = info->fetch_scanline_32;
+ image->fetch_scanline_64 = info->fetch_scanline_64;
+ image->fetch_pixel_32 = info->fetch_pixel_32;
+ image->fetch_pixel_64 = info->fetch_pixel_64;
+ image->store_scanline_32 = info->store_scanline_32;
+ image->store_scanline_64 = info->store_scanline_64;
return;
}
@@ -2901,13 +2901,13 @@ setup_accessors (bits_image_t *image)
#ifndef PIXMAN_FB_ACCESSORS
void
-_pixman_bits_image_setup_raw_accessors_accessors (bits_image_t *image);
+_pixman_bits_image_setup_accessors_accessors (bits_image_t *image);
void
-_pixman_bits_image_setup_raw_accessors (bits_image_t *image)
+_pixman_bits_image_setup_accessors (bits_image_t *image)
{
if (image->read_func || image->write_func)
- _pixman_bits_image_setup_raw_accessors_accessors (image);
+ _pixman_bits_image_setup_accessors_accessors (image);
else
setup_accessors (image);
}
@@ -2915,7 +2915,7 @@ _pixman_bits_image_setup_raw_accessors (bits_image_t *image)
#else
void
-_pixman_bits_image_setup_raw_accessors_accessors (bits_image_t *image)
+_pixman_bits_image_setup_accessors_accessors (bits_image_t *image)
{
setup_accessors (image);
}
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index f8ddcbc..d27256d 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -43,14 +43,14 @@ _pixman_image_store_scanline_32 (bits_image_t * image,
int width,
const uint32_t *buffer)
{
- image->store_scanline_raw_32 (image, x, y, width, 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_raw_32 (
+ image->common.alpha_map->store_scanline_32 (
image->common.alpha_map, x, y, width, buffer);
}
}
@@ -62,14 +62,14 @@ _pixman_image_store_scanline_64 (bits_image_t * image,
int width,
const uint32_t *buffer)
{
- image->store_scanline_raw_64 (image, x, y, width, 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_raw_64 (
+ image->common.alpha_map->store_scanline_64 (
image->common.alpha_map, x, y, width, buffer);
}
}
@@ -86,7 +86,7 @@ fetch_pixel_no_alpha (bits_image_t *image,
return 0;
}
- return image->fetch_pixel_raw_32 (image, x, y);
+ return image->fetch_pixel_32 (image, x, y);
}
typedef uint32_t (* get_pixel_t) (bits_image_t *image,
@@ -655,7 +655,7 @@ fetch_pixel_general (bits_image_t *image, int x, int y, pixman_bool_t check_boun
return 0;
}
- pixel = image->fetch_pixel_raw_32 (image, x, y);
+ pixel = image->fetch_pixel_32 (image, x, y);
if (image->common.alpha_map)
{
@@ -671,7 +671,7 @@ fetch_pixel_general (bits_image_t *image, int x, int y, pixman_bool_t check_boun
}
else
{
- pixel_a = image->common.alpha_map->fetch_pixel_raw_32 (
+ pixel_a = image->common.alpha_map->fetch_pixel_32 (
image->common.alpha_map, x, y);
pixel_a = ALPHA_8 (pixel_a);
@@ -760,7 +760,7 @@ bits_image_fetch_solid_32 (pixman_image_t * image,
uint32_t color;
uint32_t *end;
- color = image->bits.fetch_pixel_raw_32 (&image->bits, 0, 0);
+ color = image->bits.fetch_pixel_32 (&image->bits, 0, 0);
end = buffer + width;
while (buffer < end)
@@ -779,7 +779,7 @@ bits_image_fetch_solid_64 (pixman_image_t * image,
uint64_t *buffer = (uint64_t *)b;
uint64_t *end;
- color = image->bits.fetch_pixel_raw_64 (&image->bits, 0, 0);
+ color = image->bits.fetch_pixel_64 (&image->bits, 0, 0);
end = buffer + width;
while (buffer < end)
@@ -818,9 +818,9 @@ bits_image_fetch_untransformed_repeat_none (bits_image_t *image,
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_raw_64 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_64 ((pixman_image_t *)image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_raw_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
width -= w;
buffer += w * (wide? 2 : 1);
@@ -856,9 +856,9 @@ bits_image_fetch_untransformed_repeat_normal (bits_image_t *image,
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_raw_64 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_64 ((pixman_image_t *)image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_raw_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
buffer += w * (wide? 2 : 1);
x += w;
@@ -911,7 +911,7 @@ bits_image_property_changed (pixman_image_t *image)
{
bits_image_t *bits = (bits_image_t *)image;
- _pixman_bits_image_setup_raw_accessors (bits);
+ _pixman_bits_image_setup_accessors (bits);
if (bits->common.alpha_map)
{
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 15a5bc2..a2736d7 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -175,17 +175,13 @@ struct bits_image
uint32_t * free_me;
int rowstride; /* in number of uint32_t's */
- /* Fetch a pixel, disregarding alpha maps, transformations etc. */
- fetch_pixel_32_t fetch_pixel_raw_32;
- fetch_pixel_64_t fetch_pixel_raw_64;
+ fetch_scanline_t fetch_scanline_32;
+ fetch_pixel_32_t fetch_pixel_32;
+ store_scanline_t store_scanline_32;
- /* Fetch raw scanlines, with no regard for transformations, alpha maps etc. */
- fetch_scanline_t fetch_scanline_raw_32;
- fetch_scanline_t fetch_scanline_raw_64;
-
- /* Store scanlines with no regard for alpha maps */
- store_scanline_t store_scanline_raw_32;
- store_scanline_t store_scanline_raw_64;
+ fetch_scanline_t fetch_scanline_64;
+ fetch_pixel_64_t fetch_pixel_64;
+ store_scanline_t store_scanline_64;
/* Used for indirect access to the bits */
pixman_read_memory_func_t read_func;
@@ -205,9 +201,8 @@ union pixman_image
solid_fill_t solid;
};
-
void
-_pixman_bits_image_setup_raw_accessors (bits_image_t *image);
+_pixman_bits_image_setup_accessors (bits_image_t *image);
void
_pixman_image_get_scanline_generic_64 (pixman_image_t *image,
--
1.7.1.1
More information about the Pixman
mailing list