xserver/hw/kdrive/src kasync.c,1.14,1.15 kpict.c,1.8,1.9

Eric Anholt xserver-commit at pdx.freedesktop.org
Thu Jul 8 01:21:28 PDT 2004


Committed by: anholt

Update of /cvs/xserver/xserver/hw/kdrive/src
In directory pdx:/tmp/cvs-serv17974/hw/kdrive/src

Modified Files:
	kasync.c kpict.c 
Log Message:
Commit the rest of the dirty optimization from 20040703 and add a
missing header include.  I don't know how this happened, but I'm going
to blame a "few" fscks having happened between testing the code and 
committing (due to other driver changes that made me not blame dirty
for the failures I saw) for disappearance of kasync.c changes.  Fixes
a lot of corruption.


Index: kasync.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kasync.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- kasync.c	2 Nov 2003 19:56:10 -0000	1.14
+++ kasync.c	8 Jul 2004 08:21:25 -0000	1.15
@@ -27,6 +27,7 @@
 #include <config.h>
 #endif
 #include "kdrive.h"
+#include "kaa.h"
 
 /*
  * These functions wrap the low-level fb rendering functions and
@@ -39,6 +40,7 @@
 		   DDXPointPtr ppt, int *pwidth, int fSorted)
 {
     KdCheckSync (pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted);
 }
 
@@ -47,6 +49,7 @@
 		 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
 {
     KdCheckSync (pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
 }
 
@@ -56,6 +59,7 @@
 		 char *bits)
 {
     KdCheckSync (pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
 }
 
@@ -64,6 +68,7 @@
 		 int srcx, int srcy, int w, int h, int dstx, int dsty)
 {
     KdCheckSync (pSrc->pScreen);
+    kaaDrawableDirty (pDst);
     return fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
 }
 
@@ -73,6 +78,7 @@
 		  unsigned long bitPlane)
 {
     KdCheckSync (pSrc->pScreen);
+    kaaDrawableDirty (pDst);
     return fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,
 			bitPlane);
 }
@@ -82,6 +88,7 @@
 		  DDXPointPtr pptInit)
 {
     KdCheckSync (pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
 }
 
@@ -90,8 +97,11 @@
 		  int mode, int npt, DDXPointPtr ppt)
 {
 
-    if (pGC->lineWidth == 0)
-	KdCheckSync (pDrawable->pScreen);
+    if (pGC->lineWidth == 0) {
+	KdCheckSync(pDrawable->pScreen);
+	kaaDrawableDirty (pDrawable);
+    }
+    kaaDrawableDirty (pDrawable);
     fbPolyLine (pDrawable, pGC, mode, npt, ppt);
 }
 
@@ -99,8 +109,11 @@
 KdCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC, 
 		    int nsegInit, xSegment *pSegInit)
 {
-    if (pGC->lineWidth == 0)
+    if (pGC->lineWidth == 0) {
 	KdCheckSync(pDrawable->pScreen);
+	kaaDrawableDirty (pDrawable);
+    }
+    kaaDrawableDirty (pDrawable);
     fbPolySegment (pDrawable, pGC, nsegInit, pSegInit);
 }
 
@@ -108,8 +121,10 @@
 KdCheckPolyRectangle (DrawablePtr pDrawable, GCPtr pGC, 
 		      int nrects, xRectangle *prect)
 {
-    if (pGC->lineWidth == 0)
+    if (pGC->lineWidth == 0) {
 	KdCheckSync(pDrawable->pScreen);
+	kaaDrawableDirty (pDrawable);
+    }
     fbPolyRectangle (pDrawable, pGC, nrects, prect);
 }
 
@@ -120,6 +135,7 @@
     if (pGC->lineWidth == 0)
     {
 	KdCheckSync(pDrawable->pScreen);
+	kaaDrawableDirty (pDrawable);
 	fbPolyArc (pDrawable, pGC, narcs, pArcs);
     }
     else
@@ -132,6 +148,7 @@
 		    int shape, int mode, int count, DDXPointPtr pPts)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbFillPolygon (pDrawable, pGC, mode, count, pPts);
 }
 #endif
@@ -141,6 +158,7 @@
 		     int nrect, xRectangle *prect)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPolyFillRect (pDrawable, pGC, nrect, prect);
 }
 
@@ -149,6 +167,7 @@
 		    int narcs, xArc *pArcs)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPolyFillArc (pDrawable, pGC, narcs, pArcs);
 }
 
@@ -158,6 +177,7 @@
 		      CharInfoPtr *ppci, pointer pglyphBase)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
 }
 
@@ -167,6 +187,7 @@
 		     CharInfoPtr *ppci, pointer pglyphBase)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
 }
 
@@ -176,6 +197,7 @@
 		   int w, int h, int x, int y)
 {
     KdCheckSync(pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
 }
 
@@ -209,6 +231,7 @@
 		  WindowPtr	pWin)
 {
     KdCheckSync(pWin->drawable.pScreen);
+    kaaDrawableDirty (&pPixmap->drawable);
     fbSaveAreas (pPixmap, prgnSave, xorg, yorg, pWin);
 }
 
@@ -220,6 +243,7 @@
 		     WindowPtr	pWin)
 {
     KdCheckSync(pWin->drawable.pScreen);
+    kaaDrawableDirty ((DrawablePtr)pWin);
     fbRestoreAreas (pPixmap, prgnSave, xorg, yorg, pWin);
 }
 
@@ -227,6 +251,7 @@
 KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
 {
     KdCheckSync (pWin->drawable.pScreen);
+    kaaDrawableDirty ((DrawablePtr)pWin);
     fbPaintWindow (pWin, pRegion, what);
 }
 
@@ -234,6 +259,7 @@
 KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 {
     KdCheckSync (pWin->drawable.pScreen);
+    kaaDrawableDirty ((DrawablePtr)pWin);
     fbCopyWindow (pWin, ptOldOrg, prgnSrc);
 }
 
@@ -245,6 +271,7 @@
 		int          layer)
 {
     KdCheckSync (pDrawable->pScreen);
+    kaaDrawableDirty (pDrawable);
     fbOverlayPaintKey (pDrawable,  pRegion, pixel, layer);
 }
 
@@ -252,6 +279,7 @@
 KdCheckOverlayCopyWindow  (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 {
     KdCheckSync (pWin->drawable.pScreen);
+    kaaDrawableDirty ((DrawablePtr)pWin);
     fbOverlayCopyWindow (pWin, ptOldOrg, prgnSrc);
 }
 #endif

Index: kpict.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kpict.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- kpict.c	3 Jul 2004 09:16:30 -0000	1.8
+++ kpict.c	8 Jul 2004 08:21:25 -0000	1.9
@@ -29,6 +29,7 @@
 #include <picturestr.h>
 #include <mipict.h>
 #include <fbpict.h>
+#include "kaa.h"
 
 void
 KdCheckComposite (CARD8      op,




More information about the xserver-commit mailing list