[xserver-commit] xserver/miext/damage damage.c,1.2,1.3

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


Committed by: keithp

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

Modified Files:
	damage.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: damage.c
===================================================================
RCS file: /cvs/xserver/xserver/miext/damage/damage.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- damage.c	2 Nov 2003 19:56:10 -0000	1.2
+++ damage.c	5 Nov 2003 05:45:31 -0000	1.3
@@ -1366,10 +1366,13 @@
     damageScrPriv(pScreen);
     DamagePtr	pDamage;
 
-    while ((pDamage = damageGetPixPriv(pPixmap)))
+    if (pPixmap->refcnt == 1)
     {
-	damageRemoveDamage (pPixmap, pDamage);
-	DamageDestroy (pDamage);
+	while ((pDamage = damageGetPixPriv(pPixmap)))
+	{
+	    damageRemoveDamage (pPixmap, pDamage);
+	    DamageDestroy (pDamage);
+	}
     }
     unwrap (pScrPriv, pScreen, DestroyPixmap);
     (*pScreen->DestroyPixmap) (pPixmap);