#include "pixman-combine32.h"
#include "pixman-private.h"
-static uint32_t *
-src_get_scanline_null (pixman_iter_t *iter, const uint32_t *mask)
-{
- return NULL;
-}
-
static void
-src_iter_init (pixman_implementation_t *imp,
- pixman_iter_t *iter,
- pixman_image_t *image,
- int x, int y, int width, int height,
- uint8_t *buffer, iter_flags_t flags)
+general_src_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x, int y, int width, int height,
+ uint8_t *buffer, iter_flags_t flags)
{
iter->image = image;
iter->x = x;
iter->width = width;
iter->buffer = (uint32_t *)buffer;
- if (!image)
- {
- iter->get_scanline = src_get_scanline_null;
- }
- else if (image->type == SOLID)
+ if (image->type == SOLID)
{
_pixman_solid_fill_iter_init (
image, iter, x, y, width, height, buffer, flags);
}
static void
-dest_iter_init (pixman_implementation_t *imp,
- pixman_iter_t *iter,
- pixman_image_t *image,
- int x, int y, int width, int height,
- uint8_t *buffer, iter_flags_t flags)
+general_dest_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x, int y, int width, int height,
+ uint8_t *buffer, iter_flags_t flags)
{
iter->image = image;
iter->x = x;
mask_buffer = src_buffer + width * Bpp;
dest_buffer = mask_buffer + width * Bpp;
- src_iter_init (imp->toplevel, &src_iter, src,
- src_x, src_y, width, height,
- src_buffer, narrow);
+ _pixman_implementation_src_iter_init (imp->toplevel, &src_iter, src,
+ src_x, src_y, width, height,
+ src_buffer, narrow);
- src_iter_init (imp->toplevel, &mask_iter, mask,
- mask_x, mask_y, width, height,
- mask_buffer, narrow);
+ _pixman_implementation_src_iter_init (imp->toplevel, &mask_iter, mask,
+ mask_x, mask_y, width, height,
+ mask_buffer, narrow);
- dest_iter_init (imp->toplevel, &dest_iter, dest,
- dest_x, dest_y, width, height,
- dest_buffer, narrow);
+ _pixman_implementation_dest_iter_init (imp->toplevel, &dest_iter, dest,
+ dest_x, dest_y, width, height,
+ dest_buffer, narrow);
component_alpha =
mask &&
imp->blt = general_blt;
imp->fill = general_fill;
+ imp->src_iter_init = general_src_iter_init;
+ imp->dest_iter_init = general_dest_iter_init;
return imp;
}
imp->delegate, bits, stride, bpp, x, y, width, height, xor);
}
+static void
+delegate_src_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t * iter,
+ pixman_image_t * image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t * buffer,
+ iter_flags_t flags)
+{
+ _pixman_implementation_src_iter_init (
+ imp->delegate, iter, image, x, y, width, height, buffer, flags);
+}
+
+static void
+delegate_dest_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t * iter,
+ pixman_image_t * image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t * buffer,
+ iter_flags_t flags)
+{
+ _pixman_implementation_dest_iter_init (
+ imp->delegate, iter, image, x, y, width, height, buffer, flags);
+}
+
pixman_implementation_t *
_pixman_implementation_create (pixman_implementation_t *delegate,
const pixman_fast_path_t *fast_paths)
*/
imp->blt = delegate_blt;
imp->fill = delegate_fill;
+ imp->src_iter_init = delegate_src_iter_init;
+ imp->dest_iter_init = delegate_dest_iter_init;
for (i = 0; i < PIXMAN_N_OPERATORS; ++i)
{
}
imp->fast_paths = fast_paths;
-
+
return imp;
}
return (*imp->fill) (imp, bits, stride, bpp, x, y, width, height, xor);
}
+static uint32_t *
+get_scanline_null (pixman_iter_t *iter, const uint32_t *mask)
+{
+ return NULL;
+}
+
+void
+_pixman_implementation_src_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t *buffer,
+ iter_flags_t flags)
+{
+ if (!image)
+ {
+ iter->get_scanline = get_scanline_null;
+ }
+ else
+ {
+ (*imp->src_iter_init) (
+ imp, iter, image, x, y, width, height, buffer, flags);
+ }
+}
+
+void
+_pixman_implementation_dest_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t *buffer,
+ iter_flags_t flags)
+{
+ (*imp->dest_iter_init) (
+ imp, iter, image, x, y, width, height, buffer, flags);
+}
int width,
int height,
uint32_t xor);
+typedef void (*pixman_iter_init_func_t) (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t *buffer,
+ iter_flags_t flags);
void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp);
void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp);
pixman_implementation_t * toplevel;
pixman_implementation_t * delegate;
const pixman_fast_path_t * fast_paths;
-
+
pixman_blt_func_t blt;
pixman_fill_func_t fill;
+ pixman_iter_init_func_t src_iter_init;
+ pixman_iter_init_func_t dest_iter_init;
pixman_combine_32_func_t combine_32[PIXMAN_N_OPERATORS];
pixman_combine_32_func_t combine_32_ca[PIXMAN_N_OPERATORS];
int height,
uint32_t xor);
+void
+_pixman_implementation_src_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t *buffer,
+ iter_flags_t flags);
+
+void
+_pixman_implementation_dest_iter_init (pixman_implementation_t *imp,
+ pixman_iter_t *iter,
+ pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint8_t *buffer,
+ iter_flags_t flags);
+
/* Specific implementations */
pixman_implementation_t *
_pixman_implementation_create_general (void);