1 commit d2120bdb06c9aacc470bb346d6bc2071c2e0749d
2 Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
3 Date: Fri Mar 12 15:32:09 2010 -0500
7 diff --git a/src/cairo-surface.c b/src/cairo-surface.c
8 index 332e3ab..4a1d6a0 100644
9 --- a/src/cairo-surface.c
10 +++ b/src/cairo-surface.c
11 @@ -1501,7 +1501,9 @@ static void
12 _wrap_release_source_image (void *data)
14 struct acquire_source_image_data *acquire_data = data;
15 - _cairo_surface_release_source_image (acquire_data->src, acquire_data->image, acquire_data->image_extra);
16 + _cairo_surface_release_source_image (acquire_data->src,
17 + acquire_data->image,
18 + acquire_data->image_extra);
22 @@ -1515,42 +1517,47 @@ _wrap_image (cairo_surface_t *src,
23 cairo_image_surface_t *surface;
24 cairo_status_t status;
26 - struct acquire_source_image_data *data = malloc(sizeof(*data));
27 + struct acquire_source_image_data *data = malloc (sizeof (*data));
28 + if (unlikely (data == NULL))
29 + return _cairo_error (CAIRO_STATUS_NO_MEMORY);
32 data->image_extra = image_extra;
34 - surface = (cairo_image_surface_t*)cairo_image_surface_create_for_data (image->data,
39 + surface = (cairo_image_surface_t*)
40 + _cairo_image_surface_create_with_pixman_format (image->data,
41 + image->pixman_format,
45 status = surface->base.status;
52 status = _cairo_user_data_array_set_data (&surface->base.user_data,
55 - _wrap_release_source_image);
58 + _wrap_release_source_image);
60 cairo_surface_destroy (&surface->base);
65 - pixman_image_set_component_alpha (surface->pixman_image,
66 - pixman_image_get_component_alpha (image->pixman_image));
69 + pixman_image_set_component_alpha (
70 + surface->pixman_image,
71 + pixman_image_get_component_alpha (image->pixman_image));
74 return CAIRO_STATUS_SUCCESS;
79 * _cairo_surface_clone_similar:
80 * @surface: a #cairo_surface_t
81 * @src: the source image
82 - * @content: target content mask
83 * @src_x: extent for the rectangle in src we actually care about
84 * @src_y: extent for the rectangle in src we actually care about
85 * @width: extent for the rectangle in src we actually care about
86 @@ -1627,12 +1634,12 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
87 _cairo_surface_release_source_image (src, image, image_extra);
90 - surface->backend->clone_similar (surface, &image->base,
96 + surface->backend->clone_similar (surface, &image->base,
102 cairo_surface_destroy(&image->base);