[xserver-commit] xserver/mi Makefile.am,3.5,3.6 miinitext.c,3.71,3.72 miscrinit.c,3.19,3.20 misprite.c,3.13,3.14 mispritest.h,1.6,1.7 mivaltree.c,1.11,1.12

Keith Packard xserver-commit@pdx.freedesktop.org
Sun, 02 Nov 2003 11:56:13 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/mi
In directory pdx:/tmp/cvs-serv23831/mi

Modified Files:
	Makefile.am miinitext.c miscrinit.c misprite.c mispritest.h 
	mivaltree.c 
Log Message:
	merge xfixes_2_branch back to HEAD


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/mi/Makefile.am,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -d -r3.5 -r3.6
--- Makefile.am	1 Oct 2003 06:43:50 -0000	3.5
+++ Makefile.am	2 Nov 2003 19:56:10 -0000	3.6
@@ -1,6 +1,10 @@
 INCLUDES = 					\
+	-I$(top_srcdir)/Xext			\
 	-I$(top_srcdir)/render			\
-	$(XSERVER_CFLAGS)
+	-I$(top_srcdir)/xfixes			\
+	-I$(top_srcdir)/damageext		\
+	-I$(top_srcdir)/miext/damage		\
+	@XSERVER_CFLAGS@
 
 noinst_LIBRARIES = libmi.a
 

Index: miinitext.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miinitext.c,v
retrieving revision 3.71
retrieving revision 3.72
diff -u -d -r3.71 -r3.72
--- miinitext.c	9 Oct 2003 06:36:26 -0000	3.71
+++ miinitext.c	2 Nov 2003 19:56:10 -0000	3.72
@@ -53,6 +53,7 @@
 #include "misc.h"
 #include "extension.h"
 #include "micmap.h"
+#include "xext.h"
 
 #ifdef NOPEXEXT /* sleaze for Solaris cpp building XsunMono */
 #undef PEXEXT
@@ -143,24 +144,12 @@
 #ifdef XINPUT
 extern void XInputExtensionInit(INITARGS);
 #endif
-#ifdef XTEST
-extern void XTestExtensionInit(INITARGS);
-#endif
-#ifdef BIGREQS
-extern void BigReqExtensionInit(INITARGS);
-#endif
-#ifdef MITMISC
-extern void MITMiscExtensionInit(INITARGS);
-#endif
 #ifdef XIDLE
 extern void XIdleExtensionInit(INITARGS);
 #endif
 #ifdef XTRAP
 extern void DEC_XTRAPInit(INITARGS);
 #endif
-#ifdef SCREENSAVER
-extern void ScreenSaverExtensionInit (INITARGS);
-#endif
 #ifdef XV
 extern void XvExtensionInit(INITARGS);
 extern void XvMCExtensionInit(INITARGS);
@@ -168,15 +157,9 @@
 #ifdef XIE
 extern void XieInit(INITARGS);
 #endif
-#ifdef XSYNC
-extern void SyncExtensionInit(INITARGS);
-#endif
 #ifdef XKB
 extern void XkbExtensionInit(INITARGS);
 #endif
-#ifdef XCMISC
-extern void XCMiscExtensionInit(INITARGS);
-#endif
 #ifdef XRECORD
 extern void RecordExtensionInit(INITARGS);
 #endif
@@ -238,10 +221,10 @@
 extern void RRExtensionInit(INITARGS);
 #endif
 #ifdef XFIXES
-extern void XFixesExtensionInit(INITARGS);
+#include "xfixes.h"
 #endif
-#ifdef RES
-extern void ResExtensionInit(INITARGS);
+#ifdef DAMAGEEXT
+#include "damageext.h"
 #endif
 
 #ifndef XFree86LOADER
@@ -386,6 +369,9 @@
 #ifdef RES
     ResExtensionInit();
 #endif
+#ifdef DAMAGEEXT
+    DamageExtensionInit ();
+#endif
 }
 
 void

Index: miscrinit.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miscrinit.c,v
retrieving revision 3.19
retrieving revision 3.20
diff -u -d -r3.19 -r3.20
--- miscrinit.c	12 Sep 2003 01:49:46 -0000	3.19
+++ miscrinit.c	2 Nov 2003 19:56:10 -0000	3.20
@@ -40,8 +40,7 @@
 #include "dix.h"
 #include "miline.h"
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/XShm.h>
+#include "shmint.h"
 #endif
 
 /* We use this structure to propogate some information from miScreenInit to

Index: misprite.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/misprite.c,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -d -r3.13 -r3.14
--- misprite.c	11 Sep 2003 05:12:51 -0000	3.13
+++ misprite.c	2 Nov 2003 19:56:10 -0000	3.14
@@ -54,6 +54,14 @@
 #ifdef RENDER
 # include   "mipict.h"
 #endif
+# include   "damage.h"
+
+#define SPRITE_DEBUG_ENABLE 0
+#if SPRITE_DEBUG_ENABLE
+#define SPRITE_DEBUG(x)	ErrorF x
+#else
+#define SPRITE_DEBUG(x)
+#endif
[...1906 lines suppressed...]
     int			x, y;
     CursorPtr		pCursor;
 
+    DamageDrawInternal (pScreen, TRUE);
     miSpriteComputeSaved (pScreen);
     pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
     pCursor = pScreenPriv->pCursor;
@@ -2295,8 +793,11 @@
 	if ((*pScreenPriv->funcs->PutUpCursor) (pScreen, pCursor, x, y,
 				  pScreenPriv->colors[SOURCE_COLOR].pixel,
 				  pScreenPriv->colors[MASK_COLOR].pixel))
-	    pScreenPriv->isUp = TRUE;
+	{
+	    miSpriteIsUpTRUE (pScreen, pScreenPriv);
+	}
     }
+    DamageDrawInternal (pScreen, FALSE);
 }
 
 /*

Index: mispritest.h
===================================================================
RCS file: /cvs/xserver/xserver/mi/mispritest.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mispritest.h	11 Sep 2003 05:12:51 -0000	1.6
+++ mispritest.h	2 Nov 2003 19:56:10 -0000	1.7
@@ -36,54 +36,61 @@
 #ifdef RENDER
 # include   "picturestr.h"
 #endif
+# include   "damage.h"
 
 /*
  * per screen information
  */
 
 typedef struct {
+    /* screen procedures */
     CloseScreenProcPtr			CloseScreen;
     GetImageProcPtr			GetImage;
     GetSpansProcPtr			GetSpans;
     SourceValidateProcPtr		SourceValidate;
-    CreateGCProcPtr			CreateGC;
-    ScreenBlockHandlerProcPtr		BlockHandler;
-    InstallColormapProcPtr		InstallColormap;
-    StoreColorsProcPtr			StoreColors;
-    PaintWindowBackgroundProcPtr	PaintWindowBackground;
-    PaintWindowBorderProcPtr		PaintWindowBorder;
+    
+    /* window procedures */
     CopyWindowProcPtr			CopyWindow;
-    ClearToBackgroundProcPtr		ClearToBackground;
+    
+    /* backing store procedures */
     SaveDoomedAreasProcPtr		SaveDoomedAreas;
-    RestoreAreasProcPtr			RestoreAreas;
-#ifdef RENDER
-    CompositeProcPtr			Composite;
-    GlyphsProcPtr			Glyphs;
-#endif
+    
+    /* colormap procedures */
+    InstallColormapProcPtr		InstallColormap;
+    StoreColorsProcPtr			StoreColors;
+    
+    /* os layer procedures */
+    ScreenBlockHandlerProcPtr		BlockHandler;
 
     CursorPtr	    pCursor;
-    int		    x;
+    int		    x;			/* cursor hotspot */
     int		    y;
-    BoxRec	    saved;
-    Bool	    isUp;
-    Bool	    shouldBeUp;
-    WindowPtr	    pCacheWin;
+    BoxRec	    saved;		/* saved area from the screen */
+    Bool	    isUp;		/* cursor in frame buffer */
+    Bool	    shouldBeUp;		/* cursor should be displayed */
+    WindowPtr	    pCacheWin;		/* window the cursor last seen in */
     Bool	    isInCacheWin;
-    Bool	    checkPixels;
+    Bool	    checkPixels;	/* check colormap collision */
     xColorItem	    colors[2];
     ColormapPtr	    pInstalledMap;
     ColormapPtr	    pColormap;
     VisualPtr	    pVisual;
     miSpriteCursorFuncPtr    funcs;
+    DamagePtr	    pDamage;		/* damage tracking structure */
 } miSpriteScreenRec, *miSpriteScreenPtr;
 
 #define SOURCE_COLOR	0
 #define MASK_COLOR	1
 
-typedef struct {
-    GCFuncs		*wrapFuncs;
-    GCOps		*wrapOps;
-} miSpriteGCRec, *miSpriteGCPtr;
+#define miSpriteIsUpTRUE(pScreen, pScreenPriv) if (!pScreenPriv->isUp) { \
+    pScreenPriv->isUp = TRUE; \
+    DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \
+}
+
+#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->isUp) { \
+    DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \
+    pScreenPriv->isUp = FALSE; \
+}
 
 /*
  * Overlap BoxPtr and Box elements

Index: mivaltree.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/mivaltree.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mivaltree.c	11 Sep 2003 05:12:51 -0000	1.11
+++ mivaltree.c	2 Nov 2003 19:56:10 -0000	1.12
@@ -259,6 +259,17 @@
 	((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask))
 	SendVisibilityNotify(pParent);
 
+#ifdef APPORTION
+    /*
+     * In redirected drawing case, reset universe to borderSize
+     */
+    if (pParent->redirectDraw)
+    {
+	/* XXX save universe as old borderClip inside aXe */
+	REGION_COPY(pScreen, universe, &pParent->borderSize);
+    }
+#endif
+
     dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x;
     dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y;