[Spice-devel] [PATCH 00/30] Convert cairo canvas to use pixman
Alexander Larsson
alexl at redhat.com
Fri Feb 19 11:54:15 PST 2010
On Fri, 2010-02-19 at 16:52 +0100, Alexander Larsson wrote:
> diff --git a/common/cairo_canvas.c b/common/cairo_canvas.c
> index a6c82ee..8d549e6 100644
> --- a/common/cairo_canvas.c
> +++ b/common/cairo_canvas.c
> @@ -240,7 +240,7 @@ static void canvas_mask_pixman (CairoCanvas
> *canvas,
> pixman_region32_t *dest_region,
> SpiceQMask *mask, int x, int y)
> {
> - pixman_image_t *image;
> + pixman_image_t *image, *subimage;
> int needs_invert;
> pixman_region32_t mask_region;
> uint32_t *mask_data;
> @@ -298,10 +298,11 @@ static void canvas_mask_pixman (CairoCanvas
> *canvas,
> mask_width = extents.x2 - extents.x1;
> mask_height = extents.y2 - extents.y1;
>
> - spice_pixman_region32_init_from_bitmap (&mask_region,
> - mask_data,
> - mask_width, mask_height,
> - mask_stride / 4);
> + subimage = pixman_image_create_bits (PIXMAN_a1, mask_width,
> mask_height,
> + mask_data, mask_stride);
> + pixman_region32_init_from_image (&mask_region,
> + subimage);
> + pixman_image_unref (subimage);
>
> if (needs_invert) {
> pixman_box32_t rect;
>
This hunk should obviously not have been in the patch. Don't ever send
"just that last patch" at the end of the day...
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alexander.larsson at gmail.com
He's an immortal native American inventor with no name. She's a manipulative
kleptomaniac stripper from a different time and place. They fight crime!
More information about the Spice-devel
mailing list