[PATCH 2/2] dix: Always store GC client clip as a region

Keith Packard keithp at keithp.com
Thu Oct 23 17:23:52 PDT 2014


Adam Jackson <ajax at redhat.com> writes:


>  static Bool exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion,
>                                 Pixel pixel, CARD32 planemask, CARD32 alu,
> -                               unsigned int clientClipType);
> +                               Bool clientClip);

Using clientClip as the name for a boolean seems likely to lead to
confusion with the usual usage of that name. Perhaps 'hasClientClip'?

>  >  void
>  xnestDestroyClip(GCPtr pGC)
>  {
> -    xnestDestroyClipHelper(pGC);
> -
> +    RegionDestroy(pGC->clientClip);

Need to check for NULL before calling RegionDestroy:

@@ -276,9 +276,11 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects)
 void
 xnestDestroyClip(GCPtr pGC)
 {
-    RegionDestroy(pGC->clientClip);
-    XSetClipMask(xnestDisplay, xnestGC(pGC), None);
-    pGC->clientClip = NULL;
+    if (pGC->clientClip) {
+        RegionDestroy(pGC->clientClip);
+        XSetClipMask(xnestDisplay, xnestGC(pGC), None);
+        pGC->clientClip = NULL;
+    }
 }


The rest of this patch has been

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141023/47ceabd3/attachment.sig>


More information about the xorg-devel mailing list