common->write_func = NULL;
common->classify = NULL;
common->client_clip = FALSE;
+ common->destroy_func = NULL;
+ common->destroy_data = NULL;
}
return image;
if (common->ref_count == 0)
{
+ if (image->common.destroy_func)
+ image->common.destroy_func (image, image->common.destroy_data);
+
pixman_region32_fini (&common->clip_region);
if (common->transform)
return FALSE;
}
+PIXMAN_EXPORT void
+pixman_image_set_destroy_function (pixman_image_t *image,
+ pixman_image_destroy_func_t func,
+ void *data)
+{
+ image->common.destroy_func = func;
+ image->common.destroy_data = data;
+}
+
+
/* Constructors */
void
property_changed_func_t property_changed;
scanFetchProc get_scanline_32;
scanFetchProc get_scanline_64;
+
+ pixman_image_destroy_func_t destroy_func;
+ void * destroy_data;
};
struct source_image
typedef uint32_t (* pixman_read_memory_func_t) (const void *src, int size);
typedef void (* pixman_write_memory_func_t) (void *dst, uint32_t value, int size);
+typedef void (* pixman_image_destroy_func_t) (pixman_image_t *image, void *data);
+
struct pixman_gradient_stop {
pixman_fixed_t x;
pixman_color_t color;
pixman_image_t *pixman_image_ref (pixman_image_t *image);
pixman_bool_t pixman_image_unref (pixman_image_t *image);
+void pixman_image_set_destroy_function (pixman_image_t *image,
+ pixman_image_destroy_func_t function,
+ void *data);
/* Set properties */
pixman_bool_t pixman_image_set_clip_region (pixman_image_t *image,