xserver: Branch 'xorg-server-1.5-apple' - 5 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri May 29 14:45:27 PDT 2009


 configure.ac                                                        |    2 
 glx/glxcmds.c                                                       |   22 +++++---
 glx/glxext.h                                                        |    2 
 glx/glxscreens.c                                                    |    2 
 glx/glxserver.h                                                     |    3 -
 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib   |   12 ++--
 hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib |binary
 mi/miexpose.c                                                       |   27 ++++++++--
 miext/rootless/rootlessScreen.c                                     |    3 -
 9 files changed, 49 insertions(+), 24 deletions(-)

New commits:
commit b4adec886c65e49cfbd30d1e3a41b613f75ed3f5
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 29 14:44:40 2009 -0700

    GLX: Purge glxint.h usage
    
    Change (__GLXvisualConfig *) to (void *) in ABI compat stubs.

diff --git a/glx/glxext.h b/glx/glxext.h
index a81850c..3260a6c 100644
--- a/glx/glxext.h
+++ b/glx/glxext.h
@@ -58,7 +58,7 @@ typedef struct {
         );
     void (*setVisualConfigs)(
         int                nconfigs,
-        __GLXvisualConfig *configs,
+        void              *configs,
         void              **privates
         );
 } __GLXextensionInfo;
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index f4839b3..7b0eb0c 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -274,7 +274,7 @@ glxGetScreen(ScreenPtr pScreen)
 }
 
 void GlxSetVisualConfigs(int nconfigs, 
-                         __GLXvisualConfig *configs, void **privates)
+                         void *configs, void **privates)
 {
     /* We keep this stub around for the DDX drivers that still
      * call it. */
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 5188689..6271258 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -60,7 +60,6 @@
 #define GL_GLEXT_PROTOTYPES /* we want prototypes */
 #include <GL/gl.h>
 #include <GL/glxproto.h>
-#include <GL/glxint.h>
 
 /* For glxscreens.h */
 typedef struct __GLXdrawable __GLXdrawable;
@@ -98,7 +97,7 @@ extern __GLXclientState *glxGetClient(ClientPtr pClient);
 void GlxExtensionInit(void);
 
 void GlxSetVisualConfigs(int nconfigs, 
-                         __GLXvisualConfig *configs, void **privates);
+                         void *configs, void **privates);
 
 struct _glapi_table;
 void GlxSetRenderTables (struct _glapi_table *table);
commit e587436cf2e1237813c924699ff0662aea3034e1
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 29 14:27:46 2009 -0700

    GLX: Purge some glxint.h usage in glxcmds.c
    
    This is related to d0b249f1c5df81f3941d638f9625fe1e16c31807 in the 1.4 branch and was ok'd by krh

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 6db5ee6..d765b49 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -870,6 +870,14 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc)
     return Success;
 }
 
+enum {
+    GLX_VIS_CONFIG_UNPAIRED = 18,
+    GLX_VIS_CONFIG_PAIRED = 20
+};
+
+enum {
+    GLX_VIS_CONFIG_TOTAL = GLX_VIS_CONFIG_UNPAIRED + GLX_VIS_CONFIG_PAIRED
+};
 
 int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 {
@@ -878,7 +886,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
     xGLXGetVisualConfigsReply reply;
     __GLXscreen *pGlxScreen;
     __GLXconfig *modes;
-    CARD32 buf[__GLX_TOTAL_CONFIG];
+    CARD32 buf[GLX_VIS_CONFIG_TOTAL];
     int p, i, err;
     __GLX_DECLARE_SWAP_VARIABLES;
     __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -887,8 +895,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 	return err;
 
     reply.numVisuals = pGlxScreen->numVisuals;
-    reply.numProps = __GLX_TOTAL_CONFIG;
-    reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG) >> 2;
+    reply.numProps = GLX_VIS_CONFIG_TOTAL;
+    reply.length = (reply.numVisuals * __GLX_SIZE_CARD32 * GLX_VIS_CONFIG_TOTAL) >> 2;
     reply.type = X_Reply;
     reply.sequenceNumber = client->sequence;
 
@@ -926,6 +934,8 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 	buf[p++] = modes->stencilBits;
 	buf[p++] = modes->numAuxBuffers;
 	buf[p++] = modes->level;
+
+	assert(p == GLX_VIS_CONFIG_UNPAIRED);
 	/* 
 	** Add token/value pairs for extensions.
 	*/
@@ -950,11 +960,11 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 	buf[p++] = 0; /* copy over visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)? */
 	buf[p++] = 0;
 
+	assert(p == GLX_VIS_CONFIG_TOTAL);
 	if (client->swapped) {
-	    __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
+	    __GLX_SWAP_INT_ARRAY(buf, p);
 	}
-	WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, 
-		(char *)buf);
+	WriteToClient(client, __GLX_SIZE_CARD32 * p, (char *)buf);
     }
     return Success;
 }
commit 032173f693f75385a40e144ffe2b7b5378bb6f2e
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 29 14:09:41 2009 -0700

    XQuartz: Fix alpha to be 1 (screenshots bug, etc)
    
    This is related to: bc964ff1e3f3d8ab590eab40d767c6241e9480d4
    XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless.
    
    which was on the 1.4 branch and implemented in fbPaintWindow.  Now that fbPaintWindow is gone, this is now in miPaintWindow().

diff --git a/configure.ac b/configure.ac
index 7f8594a..6d68ede 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1676,7 +1676,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
-	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA"
+	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
 	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.2] [applewm >= 1.2] xfixes fixesproto x11)
 
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 2fba6a2..961c35c 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -535,7 +535,7 @@ _X_EXPORT void
 miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
 {
     ScreenPtr	pScreen = pWin->drawable.pScreen;
-    ChangeGCVal gcval[5];
+    ChangeGCVal gcval[6];
     BITS32	gcmask;
     GCPtr	pGC;
     int		i;
@@ -603,18 +603,35 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
     gcval[0].val = GXcopy;
     gcmask = GCFunction;
 
+#ifdef ROOTLESS_SAFEALPHA
+/* Bit mask for alpha channel with a particular number of bits per
+ * pixel. Note that we only care for 32bpp data. Mac OS X uses planar
+ * alpha for 16bpp.
+ */
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+#endif
+    
     if (solid)
     {
+#ifdef ROOTLESS_SAFEALPHA
+	gcval[1].val = fill.pixel | RootlessAlphaMask(pWin->drawable.bitsPerPixel);
+#else
 	gcval[1].val = fill.pixel;
+#endif
 	gcval[2].val  = FillSolid;
 	gcmask |= GCForeground | GCFillStyle;
     }
     else
     {
-	gcval[1].val = FillTiled;
-	gcval[2].ptr = (pointer)fill.pixmap;
-	gcval[3].val = tile_x_off;
-	gcval[4].val = tile_y_off;
+	int c=1;
+#ifdef ROOTLESS_SAFEALPHA
+	gcval[c++].val = ((CARD32)-1) & ~RootlessAlphaMask(pWin->drawable.bitsPerPixel);
+	gcmask |= GCPlaneMask;
+#endif
+	gcval[c++].val = FillTiled;
+	gcval[c++].ptr = (pointer)fill.pixmap;
+	gcval[c++].val = tile_x_off;
+	gcval[c++].val = tile_y_off;
 	gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin;
     }
 
commit 4975c087257b52189a5c21d93d121f183e60e4c8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 29 14:02:18 2009 -0700

    Rootless: Use miPaintWindow since PaintWindowBackground is dead

diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 4345c92..31b0d8b 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -477,8 +477,7 @@ static void expose_1 (WindowPtr pWin) {
     if (!pWin->realized)
         return;
     
-    (*pWin->drawable.pScreen->PaintWindowBackground) (pWin, &pWin->borderClip,
-                                                      PW_BACKGROUND);
+    miPaintWindow(pWin, &pWin->borderClip, PW_BACKGROUND);
     
     /* FIXME: comments in windowstr.h indicate that borderClip doesn't
      include subwindow visibility. But I'm not so sure.. so we may
commit 891edc919ce33f18904c935bb7f541c0d4be2cb9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu May 28 15:30:20 2009 -0700

    XQuartz: English localization update for HIG compliance
    (cherry picked from commit 86b319d7cbef39d75b54c9d321e5dbf097b552be)

diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index d271625..38b0018 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -2,9 +2,9 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9G55</string>
+		<string key="IBDocument.SystemVersion">9J61</string>
 		<string key="IBDocument.InterfaceBuilderVersion">677</string>
-		<string key="IBDocument.AppKitVersion">949.43</string>
+		<string key="IBDocument.AppKitVersion">949.46</string>
 		<string key="IBDocument.HIToolboxVersion">353.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -857,7 +857,7 @@ Lg</string>
 												<object class="NSButtonCell" key="NSCell" id="501304422">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Update CLIPBOARD when Pasteboard changes.</string>
+													<string key="NSContents">Update CLIPBOARD when Pasteboard changes</string>
 													<reference key="NSSupport" ref="463863101"/>
 													<reference key="NSControlView" ref="477050998"/>
 													<int key="NSButtonFlags">1211912703</int>
@@ -878,7 +878,7 @@ Lg</string>
 												<object class="NSButtonCell" key="NSCell" id="510771323">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Update PRIMARY (middle-click) when Pasteboard changes.</string>
+													<string key="NSContents">Update PRIMARY (middle-click) when Pasteboard changes</string>
 													<reference key="NSSupport" ref="463863101"/>
 													<reference key="NSControlView" ref="765780304"/>
 													<int key="NSButtonFlags">1211912703</int>
@@ -899,7 +899,7 @@ Lg</string>
 												<object class="NSButtonCell" key="NSCell" id="897099877">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Update Pasteboard immediately when new text is selected.</string>
+													<string key="NSContents">Update Pasteboard immediately when new text is selected</string>
 													<reference key="NSSupport" ref="463863101"/>
 													<reference key="NSControlView" ref="1002778833"/>
 													<int key="NSButtonFlags">1211912703</int>
@@ -920,7 +920,7 @@ Lg</string>
 												<object class="NSButtonCell" key="NSCell" id="619977658">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Update Pasteboard when CLIPBOARD changes.</string>
+													<string key="NSContents">Update Pasteboard when CLIPBOARD changes</string>
 													<reference key="NSSupport" ref="463863101"/>
 													<reference key="NSControlView" ref="487809555"/>
 													<int key="NSButtonFlags">1211912703</int>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index ee6cdf2..5165089 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ


More information about the xorg-commit mailing list