void
_pixman_bits_image_setup_raw_accessors (bits_image_t *image)
{
- if (image->common.read_func || image->common.write_func)
+ if (image->read_func || image->write_func)
_pixman_bits_image_setup_raw_accessors_accessors (image);
else
setup_accessors (image);
#define ACCESS(sym) sym##_accessors
#define READ(img, ptr) \
- ((img)->common.read_func ((ptr), sizeof(*(ptr))))
+ (((bits_image_t *)(img))->read_func ((ptr), sizeof(*(ptr))))
#define WRITE(img, ptr,val) \
- ((img)->common.write_func ((ptr), (val), sizeof (*(ptr))))
+ (((bits_image_t *)(img))->write_func ((ptr), (val), sizeof (*(ptr))))
#define MEMCPY_WRAPPED(img, dst, src, size) \
do { \
image->bits.height = height;
image->bits.bits = bits;
image->bits.free_me = free_me;
+ image->bits.read_func = NULL;
+ image->bits.write_func = NULL;
/* The rowstride is stored in number of uint32_t */
image->bits.rowstride = rowstride_bytes / (int) sizeof (uint32_t);
pixman_fixed_t t,
pixman_fixed_t b)
{
- if (image->common.read_func || image->common.write_func)
+ return_if_fail (image->type == BITS);
+
+ if (image->bits.read_func || image->bits.write_func)
pixman_rasterize_edges_accessors (image, l, r, t, b);
else
pixman_rasterize_edges_no_accessors (image, l, r, t, b);
&& (src->common.filter == PIXMAN_FILTER_NEAREST)
&& PIXMAN_FORMAT_BPP (dest->bits.format) == 32
&& src->bits.format == dest->bits.format
- && !src->common.read_func && !src->common.write_func
- && !dest->common.read_func && !dest->common.write_func)
+ && !src->bits.read_func && !src->bits.write_func
+ && !dest->bits.read_func && !dest->bits.write_func)
{
/* ensure that the transform matrix only has a scale */
if (src->common.transform->matrix[0][1] == 0 &&
*/
if (!wide &&
!dest->common.alpha_map &&
- !dest->common.write_func &&
+ !dest->bits.write_func &&
(op == PIXMAN_OP_ADD || op == PIXMAN_OP_OVER) &&
(dest->bits.format == PIXMAN_a8r8g8b8 ||
dest->bits.format == PIXMAN_x8r8g8b8))
common->alpha_map = NULL;
common->component_alpha = FALSE;
common->ref_count = 1;
- common->read_func = NULL;
- common->write_func = NULL;
common->classify = NULL;
common->client_clip = FALSE;
common->destroy_func = NULL;
{
return_if_fail (image != NULL);
- image->common.read_func = read_func;
- image->common.write_func = write_func;
+ if (image->type == BITS)
+ {
+ image->bits.read_func = read_func;
+ image->bits.write_func = write_func;
- image_property_changed (image);
+ image_property_changed (image);
+ }
}
PIXMAN_EXPORT uint32_t *
int alpha_origin_x;
int alpha_origin_y;
pixman_bool_t component_alpha;
- pixman_read_memory_func_t read_func;
- pixman_write_memory_func_t write_func;
classify_func_t classify;
property_changed_func_t property_changed;
fetch_scanline_t get_scanline_32;
&& (!mask || (mask->common.filter != PIXMAN_FILTER_CONVOLUTION &&
mask->common.repeat != PIXMAN_REPEAT_PAD &&
mask->common.repeat != PIXMAN_REPEAT_REFLECT))
- && !src->common.read_func && !src->common.write_func
- && !(mask && mask->common.read_func)
- && !(mask && mask->common.write_func)
- && !dest->common.read_func
- && !dest->common.write_func)
+ && !src->bits.read_func && !src->bits.write_func
+ && !(mask && mask->bits.read_func)
+ && !(mask && mask->bits.write_func)
+ && !dest->bits.read_func
+ && !dest->bits.write_func)
{
const pixman_fast_path_t *info;
pixman_bool_t pixbuf;