diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-12-10 14:44:22 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-01-18 12:42:26 -0500 |
commit | 0a6360a7ee0983dd52d368f5352d8c313fb0570b (patch) | |
tree | 0d6ff4fd68a5bf060d907427e5cb2f1d6d71f419 | |
parent | 34b5633105e5e2838ac8deb32d26e3bbe73a3d1a (diff) |
Allow NULL property_changed function
Initialize the field to NULL, and then delete the empty functions from
the solid, linear, radial, and conical images.
-rw-r--r-- | pixman/pixman-conical-gradient.c | 7 | ||||
-rw-r--r-- | pixman/pixman-image.c | 4 | ||||
-rw-r--r-- | pixman/pixman-linear-gradient.c | 6 | ||||
-rw-r--r-- | pixman/pixman-radial-gradient.c | 7 | ||||
-rw-r--r-- | pixman/pixman-solid-fill.c | 6 |
5 files changed, 3 insertions, 27 deletions
diff --git a/pixman/pixman-conical-gradient.c b/pixman/pixman-conical-gradient.c index a00170bd..d43b4548 100644 --- a/pixman/pixman-conical-gradient.c +++ b/pixman/pixman-conical-gradient.c @@ -156,11 +156,6 @@ conical_gradient_get_scanline_32 (pixman_image_t *image, } } -static void -conical_gradient_property_changed (pixman_image_t *image) -{ -} - static uint32_t * conical_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask) { @@ -221,8 +216,6 @@ pixman_image_create_conical_gradient (pixman_point_fixed_t * center, conical->center = *center; conical->angle = (pixman_fixed_to_double (angle) / 180.0) * M_PI; - image->common.property_changed = conical_gradient_property_changed; - return image; } diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index e0592864..1aa9de15 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -73,6 +73,7 @@ _pixman_image_allocate (void) common->component_alpha = FALSE; common->ref_count = 1; common->classify = NULL; + common->property_changed = NULL; common->client_clip = FALSE; common->destroy_func = NULL; common->destroy_data = NULL; @@ -416,7 +417,8 @@ _pixman_image_validate (pixman_image_t *image) * property_changed() can make use of the flags * to set up accessors etc. */ - image->common.property_changed (image); + if (image->common.property_changed) + image->common.property_changed (image); image->common.dirty = FALSE; } diff --git a/pixman/pixman-linear-gradient.c b/pixman/pixman-linear-gradient.c index a19d9a84..4c0792c0 100644 --- a/pixman/pixman-linear-gradient.c +++ b/pixman/pixman-linear-gradient.c @@ -219,11 +219,6 @@ linear_get_scanline_32 (pixman_image_t *image, } } -static void -linear_gradient_property_changed (pixman_image_t *image) -{ -} - static uint32_t * linear_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask) @@ -294,7 +289,6 @@ pixman_image_create_linear_gradient (pixman_point_fixed_t * p1, image->type = LINEAR; image->common.classify = linear_gradient_classify; - image->common.property_changed = linear_gradient_property_changed; return image; } diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c index 51218272..d1017d2e 100644 --- a/pixman/pixman-radial-gradient.c +++ b/pixman/pixman-radial-gradient.c @@ -386,11 +386,6 @@ radial_gradient_get_scanline_32 (pixman_image_t *image, } } -static void -radial_gradient_property_changed (pixman_image_t *image) -{ -} - static uint32_t * radial_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask) { @@ -471,8 +466,6 @@ pixman_image_create_radial_gradient (pixman_point_fixed_t * inner, radial->mindr = -1. * pixman_fixed_1 * radial->c1.radius; - image->common.property_changed = radial_gradient_property_changed; - return image; } diff --git a/pixman/pixman-solid-fill.c b/pixman/pixman-solid-fill.c index f2df3c76..2531dbd8 100644 --- a/pixman/pixman-solid-fill.c +++ b/pixman/pixman-solid-fill.c @@ -69,11 +69,6 @@ solid_fill_classify (pixman_image_t *image, return SOURCE_IMAGE_CLASS_HORIZONTAL; } -static void -solid_fill_property_changed (pixman_image_t *image) -{ -} - void _pixman_solid_fill_iter_init (pixman_image_t *image, pixman_iter_t *iter, @@ -128,7 +123,6 @@ pixman_image_create_solid_fill (pixman_color_t *color) img->solid.color_64 = color_to_uint64 (color); img->common.classify = solid_fill_classify; - img->common.property_changed = solid_fill_property_changed; return img; } |