}
static force_inline uint32_t
-convert_pixel_to_a8r8g8b8 (pixman_image_t *image,
+convert_pixel_to_a8r8g8b8 (bits_image_t *image,
pixman_format_code_t format,
uint32_t pixel)
{
if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_GRAY ||
PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_COLOR)
{
- return image->bits.indexed->rgba[pixel];
+ return image->indexed->rgba[pixel];
}
else
{
}
static force_inline uint32_t
-fetch_and_convert_pixel (pixman_image_t * image,
+fetch_and_convert_pixel (bits_image_t * image,
const uint8_t * bits,
int offset,
pixman_format_code_t format)
#define MAKE_ACCESSORS(format) \
static void \
- fetch_scanline_ ## format (pixman_image_t *image, \
+ fetch_scanline_ ## format (bits_image_t *image, \
int x, \
int y, \
int width, \
const uint32_t *mask) \
{ \
uint8_t *bits = \
- (uint8_t *)(image->bits.bits + y * image->bits.rowstride); \
+ (uint8_t *)(image->bits + y * image->rowstride); \
int i; \
\
for (i = 0; i < width; ++i) \
uint8_t *bits = \
(uint8_t *)(image->bits + line * image->rowstride); \
\
- return fetch_and_convert_pixel ((pixman_image_t *)image, \
- bits, offset, PIXMAN_ ## format); \
+ return fetch_and_convert_pixel ( \
+ image, bits, offset, PIXMAN_ ## format); \
} \
\
static const void *const __dummy__ ## format
}
static void
-fetch_scanline_a8r8g8b8_sRGB_float (pixman_image_t *image,
+fetch_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
/* Expects a float buffer */
static void
-fetch_scanline_a2r10g10b10_float (pixman_image_t *image,
+fetch_scanline_a2r10g10b10_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
/* Expects a float buffer */
static void
-fetch_scanline_x2r10g10b10_float (pixman_image_t *image,
+fetch_scanline_x2r10g10b10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
/* Expects a float buffer */
static void
-fetch_scanline_a2b10g10r10_float (pixman_image_t *image,
+fetch_scanline_a2b10g10r10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
/* Expects a float buffer */
static void
-fetch_scanline_x2b10g10r10_float (pixman_image_t *image,
+fetch_scanline_x2b10g10r10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
}
static void
-fetch_scanline_yuy2 (pixman_image_t *image,
+fetch_scanline_yuy2 (bits_image_t *image,
int x,
int line,
int width,
uint32_t * buffer,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + image->bits.rowstride * line;
+ const uint32_t *bits = image->bits + image->rowstride * line;
int i;
for (i = 0; i < width; i++)
}
static void
-fetch_scanline_yv12 (pixman_image_t *image,
+fetch_scanline_yv12 (bits_image_t *image,
int x,
int line,
int width,
}
static void
-fetch_scanline_generic_float (pixman_image_t *image,
+fetch_scanline_generic_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * buffer,
const uint32_t *mask)
{
- image->bits.fetch_scanline_32 (image, x, y, width, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, width, buffer, NULL);
- pixman_expand_to_float ((argb_t *)buffer, buffer, image->bits.format, width);
+ pixman_expand_to_float ((argb_t *)buffer, buffer, image->format, width);
}
/* The 32_sRGB paths should be deleted after narrow processing
* is no longer invoked for formats that are considered wide.
* (Also see fetch_pixel_generic_lossy_32) */
static void
-fetch_scanline_a8r8g8b8_32_sRGB (pixman_image_t *image,
+fetch_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
int x,
int y,
int width,
uint32_t *buffer,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
uint32_t tmp;
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_float ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_float (image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, w, buffer, NULL);
width -= w;
buffer += w * (wide? 4 : 1);
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_float ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_float (image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, w, buffer, NULL);
buffer += w * (wide? 4 : 1);
x += w;
int width = iter->width;
uint32_t * buffer = iter->buffer;
- image->bits.fetch_scanline_32 (image, x, y, width, buffer, mask);
+ image->bits.fetch_scanline_32 (&image->bits, x, y, width, buffer, mask);
if (image->common.alpha_map)
{
uint32_t *alpha;
y -= image->common.alpha_origin_y;
image->common.alpha_map->fetch_scanline_32 (
- (pixman_image_t *)image->common.alpha_map,
- x, y, width, alpha, mask);
+ image->common.alpha_map, x, y, width, alpha, mask);
for (i = 0; i < width; ++i)
{
argb_t * buffer = (argb_t *)iter->buffer;
image->fetch_scanline_float (
- (pixman_image_t *)image, x, y, width, (uint32_t *)buffer, mask);
+ image, x, y, width, (uint32_t *)buffer, mask);
if (image->common.alpha_map)
{
argb_t *alpha;
y -= image->common.alpha_origin_y;
image->common.alpha_map->fetch_scanline_float (
- (pixman_image_t *)image->common.alpha_map,
- x, y, width, (uint32_t *)alpha, mask);
+ image->common.alpha_map, x, y, width, (uint32_t *)alpha, mask);
for (i = 0; i < width; ++i)
buffer[i].a = alpha[i].a;