[cairo] [patch] pixman rectangular clipping fix

graydon hoare graydon at redhat.com
Fri Sep 17 11:44:07 PDT 2004


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,



More information about the cairo mailing list