[xserver-commit] xserver/mi Makefile.am,3.6,3.7 mi.h,3.11,3.12 miinitext.c,3.72,3.73 mivaltree.c,1.12,1.13

Keith Packard xserver-commit@pdx.freedesktop.org
Tue, 04 Nov 2003 21:45:33 -0800


Committed by: keithp

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

Modified Files:
	Makefile.am mi.h miinitext.c mivaltree.c 
Log Message:
	* Makefile.am:
	* composite/Makefile.am:
	* composite/compalloc.c: (compReportDamage), (compDestroyDamage),
	(compAllocPixmap), (compFreePixmap), (compReallocPixmap):
	* composite/compinit.c: (compCloseScreen), (compScreenUpdate),
	(compBlockHandler), (compScreenInit), (CompositeExtensionInit):
	* composite/compint.h:
	* composite/compwindow.c: (compCheckWindow), (compCheckTree),
	(compSetPixmapVisitWindow), (compSetPixmap),
	(compShouldBeRedirected), (compCheckRedirect),
	(compPositionWindow), (compRealizeWindow), (compUnrealizeWindow),
	(compReparentWindow), (compCopyWindow), (compCreateWindow),
	(compDestroyWindow), (compRedirectBorderClip),
	(compGetWindowVisual), (compWindowFormat),
	(compWindowUpdateAutomatic), (compWindowPaintBackground),
	(compWindowUpdate):
	* configure.ac:
	* dix/window.c: (SetWinSize), (SetBorderSize):
	* fb/fb.h:
	* fb/fbpict.c: (fbIn24), (fbCompositeTrans_0565xnx0565),
	(fbCompositeSrcSrc_nxn), (fbComposite):
	* fb/fbpict.h:
	* include/picturestr.h:
	* include/windowstr.h:
	* mi/Makefile.am:
	* mi/mi.h:
	* mi/miinitext.c:
	* mi/mivaltree.c: (miRegisterRedirectBorderClipProc),
	(miGetRedirectBorderClipProc), (miComputeClips):
	* miext/damage/damage.c: (damageDestroyPixmap):
	* render/mipict.c: (miValidatePicture):
	* render/picture.c: (SetPictureClipRects), (SetPictureClipRegion):
	* xfixes/region.c: (ProcXFixesSetPictureClipRegion):
	Initial import of Composite extension along with
	name change from Apportion.
	Added some accelerated code to fbpict to make this initial
	hack a bit faster.  "real" extension bits to follow.


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/mi/Makefile.am,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -d -r3.6 -r3.7
--- Makefile.am	2 Nov 2003 19:56:10 -0000	3.6
+++ Makefile.am	5 Nov 2003 05:45:31 -0000	3.7
@@ -3,6 +3,7 @@
 	-I$(top_srcdir)/render			\
 	-I$(top_srcdir)/xfixes			\
 	-I$(top_srcdir)/damageext		\
+	-I$(top_srcdir)/composite		\
 	-I$(top_srcdir)/miext/damage		\
 	@XSERVER_CFLAGS@
 

Index: mi.h
===================================================================
RCS file: /cvs/xserver/xserver/mi/mi.h,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -d -r3.11 -r3.12
--- mi.h	11 Sep 2003 05:12:51 -0000	3.11
+++ mi.h	5 Nov 2003 05:45:31 -0000	3.12
@@ -495,6 +495,15 @@
     int /*y*/
 );
 
+typedef void 
+(*RedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
+
+void
+miRegisterRedirectBorderClipProc (RedirectBorderClipProcPtr redirectBorderClip);
+
+RedirectBorderClipProcPtr
+miGetRedirectBorderClipProc (void);
+
 extern int miValidateTree(
     WindowPtr /*pParent*/,
     WindowPtr /*pChild*/,

Index: miinitext.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miinitext.c,v
retrieving revision 3.72
retrieving revision 3.73
diff -u -d -r3.72 -r3.73
--- miinitext.c	2 Nov 2003 19:56:10 -0000	3.72
+++ miinitext.c	5 Nov 2003 05:45:31 -0000	3.73
@@ -226,6 +226,9 @@
 #ifdef DAMAGEEXT
 #include "damageext.h"
 #endif
+#ifdef COMPOSITE
+#include "compint.h"
+#endif
 
 #ifndef XFree86LOADER
 
@@ -372,6 +375,9 @@
 #ifdef DAMAGEEXT
     DamageExtensionInit ();
 #endif
+#ifdef COMPOSITE
+    CompositeExtensionInit ();
+#endif
 }
 
 void

Index: mivaltree.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/mivaltree.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- mivaltree.c	2 Nov 2003 19:56:10 -0000	1.12
+++ mivaltree.c	5 Nov 2003 05:45:31 -0000	1.13
@@ -162,6 +162,20 @@
 }
 #endif
 
+static RedirectBorderClipProcPtr	miRedirectBorderClipProc;
+
+void
+miRegisterRedirectBorderClipProc (RedirectBorderClipProcPtr redirectBorderClip)
+{
+    miRedirectBorderClipProc = redirectBorderClip;
+}
+
+RedirectBorderClipProcPtr
+miGetRedirectBorderClipProc (void)
+{
+    return miRedirectBorderClipProc;
+}
+
 #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
 				    HasBorder(w) && \
 				    (w)->backgroundState == ParentRelative)
@@ -259,13 +273,14 @@
 	((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask))
 	SendVisibilityNotify(pParent);
 
-#ifdef APPORTION
+#ifdef COMPOSITE
     /*
      * In redirected drawing case, reset universe to borderSize
      */
     if (pParent->redirectDraw)
     {
-	/* XXX save universe as old borderClip inside aXe */
+	if (miRedirectBorderClipProc)
+	    (*miRedirectBorderClipProc) (pParent, universe);
 	REGION_COPY(pScreen, universe, &pParent->borderSize);
     }
 #endif