[cairo] [patch] pixman rectangular clipping fix
c99drn at cs.umu.se
c99drn at cs.umu.se
Fri Sep 17 14:09:53 PDT 2004
Quoting graydon hoare <graydon at redhat.com>:
> hi,
>
> I noticed today in cairo_gstate.c that the rectangular clipping
> fast path has been disabled. since this fast path is very important
> when rendering GUIs with cairo I investigated the source of the
> bug; it is actually localized to the image backend, and can be
> corrected with the following patch.
>
> is it OK to commit this? I must admit the multiple layers of
> clipping in pixman are quite confusing, so I am not *certain* this
> is correct; it does seem to follow the intention of the function
> however (compute the correct compositing clipping region).
>
> also, if this is OK, may I re-enable the cairo fast path?
>
> -graydon
>
>
> --- icimage.c 2004-05-10 16:41:40.000000000 -0400
> +++ icimage.c 2004-09-17 14:40:06.945495992 -0400
> @@ -603,6 +603,12 @@
> pixman_region_destroy (region);
> return 0;
> }
> +
> + if (iDst->clientClipType != CT_NONE && iDst->clientClip != NULL)
> + {
> + pixman_region_intersect (region, iDst->clientClip, region);
> + }
> +
> if (iDst->alphaMap)
> {
> if (!IcClipImageReg (region, iDst->alphaMap->pCompositeClip,
I've already committed I fix for that a few days ago. I never re-enabled the
fast path for clipping in cairo so you can go a head and do that if you like.
I've also changed so that libpixman is now making a copy of region passed to
pixman_image_set_clip_region, so a copy of the region should no longer be made
in cairo_image_surface_set_clip_region. You should fix that as well if you
re-enabled the fast clipping.
- David
More information about the cairo
mailing list