[xserver-commit] xserver/composite compinit.c,1.1,1.2 compwindow.c,1.1,1.2

Keith Packard xserver-commit@pdx.freedesktop.org
Tue, 04 Nov 2003 22:46:15 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/composite
In directory pdx:/tmp/cvs-serv7853/composite

Modified Files:
	compinit.c compwindow.c 
Log Message:
	* composite/compinit.c: (CompositeExtensionInit):
	* composite/compwindow.c: (compWindowUpdateAutomatic),
	(compWindowUpdate):
	* hw/kdrive/src/kinput.c: (KdMouseAccelerate),
	(KdEnqueueMouseEvent):
	Replace translucent compositing hacks with PictOpSrc to
	match eventual extension semantics.
	Replace mouse acceleration with quadratic.


Index: compinit.c
===================================================================
RCS file: /cvs/xserver/xserver/composite/compinit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- compinit.c	5 Nov 2003 05:45:31 -0000	1.1
+++ compinit.c	5 Nov 2003 06:46:13 -0000	1.2
@@ -141,6 +141,8 @@
 {
     int	    s;
 
+    if (!getenv ("XCOMPOSITE"))
+	return;
     for (s = 0; s < screenInfo.numScreens; s++)
 	if (!compScreenInit (screenInfo.screens[s]))
 	    return;

Index: compwindow.c
===================================================================
RCS file: /cvs/xserver/xserver/composite/compwindow.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- compwindow.c	5 Nov 2003 05:45:31 -0000	1.1
+++ compwindow.c	5 Nov 2003 06:46:13 -0000	1.2
@@ -270,7 +270,6 @@
 						 vlist,
 						 serverClient,
 						 &error);
-    PicturePtr	    pMskPicture = 0;
     PicturePtr	    pDstPicture = CreatePicture (0, &pWin->parent->drawable,
 						 pDstFormat,
 						 CPSubwindowMode,
@@ -278,22 +277,9 @@
 						 serverClient,
 						 &error);
     
-/*    if (pWin->overrideRedirect) */
-    {
-	PixmapPtr	pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, 8);
-	PictFormatPtr	pMskFormat = PictureMatchFormat (pScreen, 8, PICT_a8);
-	XID		vlist[1] = { TRUE };
-	static xRenderColor mskColor = { 0, 0, 0, 0xc000 };
-	static xRectangle   mskRect = { 0, 0, 1, 1 };
-	
-	pMskPicture = CreatePicture (0, &pPixmap->drawable, pMskFormat,
-				     CPRepeat, vlist, serverClient, &error);
-	(*pScreen->DestroyPixmap) (pPixmap);
-	CompositeRects (PictOpSrc, pMskPicture, &mskColor, 1, &mskRect);
-    }
-    CompositePicture (PictOpOver,
+    CompositePicture (PictOpSrc,
 		      pSrcPicture,
-		      pMskPicture,
+		      0,
 		      pDstPicture,
 		      0,
 		      0,
@@ -303,35 +289,14 @@
 		      pSrcPixmap->drawable.width,
 		      pSrcPixmap->drawable.height);
     FreePicture (pSrcPicture, 0);
-    if (pMskPicture)
-	FreePicture (pMskPicture, 0);
     FreePicture (pDstPicture, 0);
 }
 
-static void
-compWindowPaintBackground (WindowPtr pWin)
-{
-    ScreenPtr	pScreen = pWin->drawable.pScreen;
-    RegionRec	exposed;
-    BoxRec	box;
-
-    box.x1 = pWin->drawable.x;
-    box.y1 = pWin->drawable.y;
-    box.x2 = pWin->drawable.x + pWin->drawable.width;
-    box.y2 = pWin->drawable.x + pWin->drawable.height;
-
-    REGION_INIT (pScreen, &exposed, &box, 1);
-    (*pScreen->PaintWindowBackground) (pWin, &exposed, PW_BACKGROUND);
-    REGION_UNINIT (pScreen, &exposed);
-}
-
 void
 compWindowUpdate (WindowPtr pWin)
 {
     WindowPtr	pChild;
 
-    if (!pWin->parent)
-	compWindowPaintBackground (pWin);
     for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
 	compWindowUpdate (pChild);
     if (pWin->redirectDraw)