This cuts down the number of property_changed calls significantly.
image->common.property_changed = bits_image_property_changed;
- bits_image_property_changed (image);
-
_pixman_image_reset_clip_region (image);
return image;
image->common.property_changed = conical_gradient_property_changed;
- conical_gradient_property_changed (image);
-
return image;
}
common->destroy_func = NULL;
common->destroy_data = NULL;
common->need_workaround = FALSE;
+ common->dirty = TRUE;
}
return image;
static void
image_property_changed (pixman_image_t *image)
{
- image->common.property_changed (image);
+ image->common.dirty = TRUE;
}
/* Ref Counting */
image->common.have_clip_region = FALSE;
}
+void
+_pixman_image_validate (pixman_image_t *image)
+{
+ if (image->common.dirty)
+ {
+ image->common.property_changed (image);
+ image->common.dirty = FALSE;
+ }
+}
+
PIXMAN_EXPORT pixman_bool_t
pixman_image_set_clip_region32 (pixman_image_t * image,
pixman_region32_t *region)
image->common.classify = linear_gradient_classify;
image->common.property_changed = linear_gradient_property_changed;
- linear_gradient_property_changed (image);
-
return image;
}
pixman_bool_t clip_sources; /* Whether the clip applies when
* the image is used as a source
*/
+ pixman_bool_t dirty;
pixman_bool_t need_workaround;
pixman_transform_t * transform;
pixman_repeat_t repeat;
void
_pixman_image_reset_clip_region (pixman_image_t *image);
+void
+_pixman_image_validate (pixman_image_t *image);
+
pixman_bool_t
_pixman_image_is_opaque (pixman_image_t *image);
image->common.property_changed = radial_gradient_property_changed;
- radial_gradient_property_changed (image);
-
return image;
}
#define GOOD_RECT(rect) ((rect)->x1 < (rect)->x2 && (rect)->y1 < (rect)->y2)
#define BAD_RECT(rect) ((rect)->x1 > (rect)->x2 || (rect)->y1 > (rect)->y2)
-#define PIXMAN_REGION_LOG_FAILURES
+#define noPIXMAN_REGION_LOG_FAILURES
#if defined PIXMAN_REGION_LOG_FAILURES || defined PIXMAN_REGION_DEBUG
img->common.classify = solid_fill_classify;
img->common.property_changed = solid_fill_property_changed;
- solid_fill_property_changed (img);
-
return img;
}
pixman_edge_t l, r;
pixman_fixed_t t, b;
+ _pixman_image_validate (image);
+
width = image->bits.width;
height = image->bits.height;
bpp = PIXMAN_FORMAT_BPP (image->bits.format);
return_if_fail (image->type == BITS);
+ _pixman_image_validate (image);
+
if (!pixman_trapezoid_valid (trap))
return;
uint32_t *dest_bits;
int dest_dx, dest_dy;
+ _pixman_image_validate (src);
+ if (mask)
+ _pixman_image_validate (mask);
+ _pixman_image_validate (dest);
+
/*
* Check if we can replace our operator by a simpler one
* if the src or dest are opaque. The output operator should be
pixman_color_t c;
int i;
+ _pixman_image_validate (dest);
+
if (color->alpha == 0xffff)
{
if (op == PIXMAN_OP_OVER)