xserver/hw/kdrive/src kaapict.c,1.15,1.16

Lars Knoll <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Wed, 29 Jun 2005 04:57:18 -0700 (PDT)
Newsgroups gmane.comp.freedesktop.xserver.cvs
Message-ID <[email protected]>
Committed by: lars

Update of /cvs/xserver/xserver/hw/kdrive/src
In directory gabe:/tmp/cvs-serv16798/hw/kdrive/src

Modified Files:
	kaapict.c 
Log Message:
Add support for gradients and solid fills to Render. 

Changed the semantics of the Convolution filter a
bit. It now doesn't try to normalize the filter
values but leaves this to the client. This gives
more reasonable behaviour in the limit where the filter
parameters sum up to 0.



Index: kaapict.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kaapict.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- kaapict.c	9 Jun 2005 10:44:45 -0000	1.15
+++ kaapict.c	29 Jun 2005 11:57:16 -0000	1.16
@@ -546,11 +546,11 @@
     KaaScreenPriv (pDst->pDrawable->pScreen);
     int ret = -1;
 
-    if (!pMask)
+    if (!pMask && pSrc->pDrawable)
     {
 	if (op == PictOpSrc)
 	{
-	    if (pScreenPriv->enabled && pSrc->pDrawable->width == 1 &&
+	    if (pScreenPriv->enabled && pSrc->pDrawable && pSrc->pDrawable->width == 1 &&
 		pSrc->pDrawable->height == 1 && pSrc->repeat)
 	    {
 		ret = kaaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst,
@@ -592,7 +592,8 @@
 	}
     }
 
-    if (pScreenPriv->enabled && pKaaScr->info->PrepareComposite &&
+    if (pSrc->pDrawable && (!pMask || pMask->pDrawable) &&
+        pScreenPriv->enabled && pKaaScr->info->PrepareComposite &&
 	!pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap)
     {
 	ret = kaaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask,