xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Thu Aug 28 10:49:49 PDT 2008


 Xext/shm.c                          |   20 +-------------------
 Xext/shmint.h                       |    3 ---
 hw/xfree86/dixmods/extmod/modinit.h |    3 ---
 3 files changed, 1 insertion(+), 25 deletions(-)

New commits:
commit 040212ee60af9d043c4c3f98bba5120c3b8e33f7
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Aug 28 13:49:35 2008 -0400

    MIT-SHM pixmaps, if they exist, are ZPixmap.

diff --git a/Xext/shm.c b/Xext/shm.c
index ba75263..9d383bc 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -137,8 +137,6 @@ _X_EXPORT int BadShmSegCode;
 _X_EXPORT RESTYPE ShmSegType;
 static ShmDescPtr Shmsegs;
 static Bool sharedPixmaps;
-static int pixmapFormat;
-static int shmPixFormat[MAXSCREENS];
 static ShmFuncsPtr shmFuncs[MAXSCREENS];
 static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
 static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivate;
@@ -231,24 +229,15 @@ ShmExtensionInit(INITARGS)
 #endif
 
     sharedPixmaps = xFalse;
-    pixmapFormat = 0;
     {
       sharedPixmaps = xTrue;
-      pixmapFormat = shmPixFormat[0];
       for (i = 0; i < screenInfo.numScreens; i++)
       {
 	if (!shmFuncs[i])
 	    shmFuncs[i] = &miFuncs;
 	if (!shmFuncs[i]->CreatePixmap)
 	    sharedPixmaps = xFalse;
-	if (shmPixFormat[i] && (shmPixFormat[i] != pixmapFormat))
-	{
-	    sharedPixmaps = xFalse;
-	    pixmapFormat = 0;
-	}
       }
-      if (!pixmapFormat)
-	pixmapFormat = ZPixmap;
       if (sharedPixmaps)
 	for (i = 0; i < screenInfo.numScreens; i++)
 	{
@@ -278,7 +267,6 @@ ShmResetProc(ExtensionEntry *extEntry)
     for (i = 0; i < MAXSCREENS; i++)
     {
 	shmFuncs[i] = (ShmFuncsPtr)NULL;
-	shmPixFormat[i] = 0;
     }
 }
 
@@ -288,12 +276,6 @@ ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs)
     shmFuncs[pScreen->myNum] = funcs;
 }
 
-_X_EXPORT void
-ShmSetPixmapFormat(ScreenPtr pScreen, int format)
-{
-    shmPixFormat[pScreen->myNum] = format;
-}
-
 static Bool
 ShmDestroyPixmap (PixmapPtr pPixmap)
 {
@@ -332,7 +314,7 @@ ProcShmQueryVersion(ClientPtr client)
     rep.length = 0;
     rep.sequenceNumber = client->sequence;
     rep.sharedPixmaps = sharedPixmaps;
-    rep.pixmapFormat = pixmapFormat;
+    rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0;
     rep.majorVersion = SHM_MAJOR_VERSION;
     rep.minorVersion = SHM_MINOR_VERSION;
     rep.uid = geteuid();
diff --git a/Xext/shmint.h b/Xext/shmint.h
index fc056bc..f659fd2 100644
--- a/Xext/shmint.h
+++ b/Xext/shmint.h
@@ -34,9 +34,6 @@ void
 ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
 
 void
-ShmSetPixmapFormat(ScreenPtr pScreen, int format);
-
-void
 ShmRegisterFbFuncs(ScreenPtr pScreen);
 
 #endif /* _SHMINT_H_ */
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 6134213..1de1485 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -66,9 +66,6 @@ extern void ResExtensionInit(INITARGS);
 #ifdef SHM
 extern void ShmExtensionInit(INITARGS);
 #include <X11/extensions/shmstr.h>
-extern void ShmSetPixmapFormat(
-    ScreenPtr pScreen,
-    int format);
 extern void ShmRegisterFuncs(
     ScreenPtr pScreen,
     ShmFuncsPtr funcs);


More information about the xorg-commit mailing list