This makes _pixman_implementation_{src,dest}_iter_init() responsible
for filling parts of the information in the iterators. Specifically,
the information passed as arguments is stored in the iterator.
Also add a height field to pixman_iter_t().
int x, int y, int width, int height,
uint8_t *buffer, iter_flags_t flags)
{
int x, int y, int width, int height,
uint8_t *buffer, iter_flags_t flags)
{
- iter->image = image;
- iter->x = x;
- iter->y = y;
- iter->width = width;
- iter->buffer = (uint32_t *)buffer;
-
if (image->type == SOLID)
{
_pixman_solid_fill_iter_init (
if (image->type == SOLID)
{
_pixman_solid_fill_iter_init (
uint8_t *buffer,
iter_flags_t flags)
{
uint8_t *buffer,
iter_flags_t flags)
{
+ iter->image = image;
+ iter->buffer = (uint32_t *)buffer;
+ iter->x = x;
+ iter->y = y;
+ iter->width = width;
+ iter->height = height;
+ iter->flags = flags;
+
if (!image)
{
iter->get_scanline = get_scanline_null;
if (!image)
{
iter->get_scanline = get_scanline_null;
uint8_t *buffer,
iter_flags_t flags)
{
uint8_t *buffer,
iter_flags_t flags)
{
+ iter->image = image;
+ iter->buffer = (uint32_t *)buffer;
+ iter->x = x;
+ iter->y = y;
+ iter->width = width;
+ iter->height = height;
+ iter->flags = flags;
+
(*imp->dest_iter_init) (
imp, iter, image, x, y, width, height, buffer, flags);
}
(*imp->dest_iter_init) (
imp, iter, image, x, y, width, height, buffer, flags);
}
- pixman_iter_get_scanline_t get_scanline;
- pixman_iter_write_back_t write_back;
-
+ /* These are initialized by _pixman_implementation_{src,dest}_init */
pixman_image_t * image;
uint32_t * buffer;
int x, y;
int width;
pixman_image_t * image;
uint32_t * buffer;
int x, y;
int width;
+ int height;
+ iter_flags_t flags;
+
+ /* These function pointers are initialized by the implementation */
+ pixman_iter_get_scanline_t get_scanline;
+ pixman_iter_write_back_t write_back;
+ /* These fields are scratch data that implementations can use */
uint8_t * bits;
int stride;
};
uint8_t * bits;
int stride;
};
iter->bits = b + s * y + x * PIXMAN_FORMAT_BPP (f->format) / 8;
iter->stride = s;
iter->bits = b + s * y + x * PIXMAN_FORMAT_BPP (f->format) / 8;
iter->stride = s;
- iter->width = width;
- iter->buffer = (uint32_t *)buffer;
iter->get_scanline = f->get_scanline;
return;
iter->get_scanline = f->get_scanline;
return;