[Xquartz-changes] xserver: Branch 'server-1.11-apple' - 11 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Wed Jun 1 21:23:30 PDT 2011
Rebased ref, commits from common ancestor:
commit 743f48b518d91e27faf0861ca23a377aebddc535
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Feb 12 19:48:52 2010 -0800
fb: Revert fb changes that broke XQuartz
http://bugs.freedesktop.org/show_bug.cgi?id=26124
Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
Revert "fb: Adjust transform or composite coordinates for pixman operations"
http://bugs.freedesktop.org/26124
This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/fb/fb.h b/fb/fb.h
index eaa21ad..e65a1c0 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2049,11 +2049,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbBits xor);
extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr pict,
- Bool has_clip,
- int *xoff,
- int *yoff);
-
+image_from_pict (PicturePtr pict,
+ Bool has_clip);
extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
#endif /* _FB_H_ */
diff --git a/fb/fbpict.c b/fb/fbpict.c
index d1fd0cb..d2986c8 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -50,24 +50,19 @@ fbComposite (CARD8 op,
CARD16 height)
{
pixman_image_t *src, *mask, *dest;
- int src_xoff, src_yoff;
- int msk_xoff, msk_yoff;
- int dst_xoff, dst_yoff;
miCompositeSourceValidate (pSrc);
if (pMask)
miCompositeSourceValidate (pMask);
- src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
- mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
- dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
+ src = image_from_pict (pSrc, TRUE);
+ mask = image_from_pict (pMask, TRUE);
+ dest = image_from_pict (pDst, TRUE);
if (src && dest && !(pMask && !mask))
{
pixman_image_composite (op, src, mask, dest,
- xSrc + src_xoff, ySrc + src_yoff,
- xMask + msk_xoff, yMask + msk_yoff,
- xDst + dst_xoff, yDst + dst_yoff,
+ xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height);
}
@@ -146,22 +141,22 @@ create_conical_gradient_image (PictGradient *gradient)
static pixman_image_t *
create_bits_picture (PicturePtr pict,
- Bool has_clip,
- int *xoff,
- int *yoff)
+ Bool has_clip)
{
- PixmapPtr pixmap;
FbBits *bits;
FbStride stride;
- int bpp;
+ int bpp, xoff, yoff;
pixman_image_t *image;
- fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
- fbGetPixmapBitsData(pixmap, bits, stride, bpp);
+ fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
+
+ bits = (FbBits*)((CARD8*)bits +
+ (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
+ (pict->pDrawable->x + xoff) * (bpp / 8));
image = pixman_image_create_bits (
(pixman_format_code_t)pict->format,
- pixmap->drawable.width, pixmap->drawable.height,
+ pict->pDrawable->width, pict->pDrawable->height,
(uint32_t *)bits, stride * sizeof (FbStride));
@@ -187,55 +182,33 @@ create_bits_picture (PicturePtr pict,
if (pict->clientClipType != CT_NONE)
pixman_image_set_has_client_clip (image, TRUE);
- if (*xoff || *yoff)
- pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
+ pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
pixman_image_set_clip_region (image, pict->pCompositeClip);
- if (*xoff || *yoff)
- pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
+ pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
}
/* Indexed table */
if (pict->pFormat->index.devPrivate)
pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
- /* Add in drawable origin to position within the image */
- *xoff += pict->pDrawable->x;
- *yoff += pict->pDrawable->y;
-
return image;
}
static pixman_image_t *
-image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map);
+image_from_pict_internal (PicturePtr pict, Bool has_clip, Bool is_alpha_map);
static void
-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
+set_image_properties (pixman_image_t *image, PicturePtr pict, Bool is_alpha_map)
{
pixman_repeat_t repeat;
pixman_filter_t filter;
if (pict->transform)
{
- /* For source images, adjust the transform to account
- * for the drawable offset within the pixman image,
- * then set the offset to 0 as it will be used
- * to compute positions within the transformed image.
- */
- if (!has_clip) {
- struct pixman_transform adjusted;
-
- adjusted = *pict->transform;
- pixman_transform_translate(&adjusted,
- NULL,
- pixman_int_to_fixed(*xoff),
- pixman_int_to_fixed(*yoff));
- pixman_image_set_transform (image, &adjusted);
- *xoff = 0;
- *yoff = 0;
- } else
- pixman_image_set_transform (image, pict->transform);
+ pixman_image_set_transform (
+ image, (pixman_transform_t *)pict->transform);
}
switch (pict->repeatType)
@@ -265,8 +238,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
*/
if (pict->alphaMap && !is_alpha_map)
{
- int alpha_xoff, alpha_yoff;
- pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff, TRUE);
+ pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, TRUE, TRUE);
pixman_image_set_alpha_map (
image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -299,7 +271,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
}
static pixman_image_t *
-image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
+image_from_pict_internal (PicturePtr pict,
+ Bool has_clip, Bool is_alpha_map)
{
pixman_image_t *image = NULL;
@@ -308,7 +281,7 @@ image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff,
if (pict->pDrawable)
{
- image = create_bits_picture (pict, has_clip, xoff, yoff);
+ image = create_bits_picture (pict, has_clip);
}
else if (pict->pSourcePict)
{
@@ -329,19 +302,18 @@ image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff,
else if (sp->type == SourcePictTypeConical)
image = create_conical_gradient_image (gradient);
}
- *xoff = *yoff = 0;
}
if (image)
- set_image_properties (image, pict, has_clip, xoff, yoff, is_alpha_map);
+ set_image_properties (image, pict, is_alpha_map);
return image;
}
pixman_image_t *
-image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+image_from_pict (PicturePtr pict, Bool has_clip)
{
- return image_from_pict_internal (pict, has_clip, xoff, yoff, FALSE);
+ return image_from_pict_internal (pict, has_clip, FALSE);
}
void
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 0b5a638..f5aaee8 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -39,9 +39,8 @@ fbAddTraps (PicturePtr pPicture,
xTrap *traps)
{
pixman_image_t *image;
- int dst_xoff, dst_yoff;
- if (!(image = image_from_pict (pPicture, FALSE, &dst_xoff, &dst_yoff)))
+ if (!(image = image_from_pict (pPicture, FALSE)))
return;
pixman_add_traps (image, x_off + dst_xoff, y_off + dst_yoff,
@@ -57,9 +56,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
int y_off)
{
pixman_image_t *image;
- int dst_xoff, dst_yoff;
- if (!(image = image_from_pict (pPicture, FALSE, &dst_xoff, &dst_yoff)))
+ if (!(image = image_from_pict (pPicture, FALSE)))
return;
pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap,
commit 31270129506476cc6940f0e69391feaa549fca5a
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Apr 30 13:08:25 2010 -0700
Workaround the GC clipping problem in miPaintWindow and add some debugging output.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 94258b8..4f25c23 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -521,6 +521,7 @@ void RootlessSetPixmapOfAncestors(WindowPtr pWin);
void RootlessStartDrawing(WindowPtr pWin);
void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
Bool IsFramedWindow(WindowPtr pWin);
+#include "../fb/fb.h"
#endif
void
@@ -548,24 +549,37 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
Bool solid = TRUE;
DrawablePtr drawable = &pWin->drawable;
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF("START %d BS %d (pR = %ld)\n", what, pWin->backgroundState, ParentRelative);
+ ErrorF(" Rgn: %d %d %d %d\n", prgn->extents.x1, prgn->extents.y1,
+ prgn->extents.x2 - prgn->extents.x1,
+ prgn->extents.y2 - prgn->extents.y1);
+ ErrorF(" Win: %d %d (%d %d) %d %d\n", pWin->origin.x, pWin->origin.y,
+ pWin->winSize.extents.x1, pWin->winSize.extents.y1,
+ pWin->winSize.extents.x2 - pWin->winSize.extents.x1,
+ pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
+ ErrorF(" Draw: %d %d %d %d\n", pWin->drawable.x, pWin->drawable.y,
+ pWin->drawable.width, pWin->drawable.height);
+#endif
+
#ifdef ROOTLESS
if(!drawable || drawable->type == UNDRAWABLE_WINDOW)
return;
-
- if(IsFramedWindow(pWin)) {
- RootlessStartDrawing(pWin);
- RootlessDamageRegion(pWin, prgn);
-
- if(pWin->backgroundState == ParentRelative) {
- if((what == PW_BACKGROUND) ||
- (what == PW_BORDER && !pWin->borderIsPixel))
- RootlessSetPixmapOfAncestors(pWin);
- }
- }
#endif
if (what == PW_BACKGROUND)
{
+#ifdef ROOTLESS
+ if(IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, prgn);
+
+ if(pWin->backgroundState == ParentRelative) {
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+#endif
+
while (pWin->backgroundState == ParentRelative)
pWin = pWin->parent;
@@ -587,6 +601,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
{
PixmapPtr pixmap;
+#ifdef ROOTLESS
+ if(IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, prgn);
+
+ if(!pWin->borderIsPixel &&
+ pWin->backgroundState == ParentRelative) {
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+#endif
+
tile_x_off = drawable->x;
tile_y_off = drawable->y;
@@ -595,6 +621,12 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
return;
pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
drawable = &pixmap->drawable;
+
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" Draw: %d %d %d %d\n",
+ drawable->x, drawable->y, drawable->width, drawable->height);
+#endif
+
#ifdef COMPOSITE
draw_x_off = pixmap->screen_x;
draw_y_off = pixmap->screen_y;
@@ -657,6 +689,57 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
ChangeGC (NullClient, pGC, gcmask, gcval);
ValidateGC (drawable, pGC);
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" GC: %d %d %d %d\n",
+ pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
+ pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
+ pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
+#endif
+
+#ifdef XQUARTZ
+ /* Looks like our clipping isn't set right for some reason:
+ * http://xquartz.macosforge.org/trac/ticket/290
+ */
+ if(what == PW_BORDER) {
+
+#if 0
+ if(solid) {
+#if 1
+ fbFillRegionSolid(&pWin->drawable,
+ prgn,
+ 0,
+ fbReplicatePixel(fill.pixel,
+ pWin->drawable.bitsPerPixel));
+#else
+ fbFillRegionSolid(drawable,
+ prgn,
+ 0,
+ fbReplicatePixel(fill.pixel,
+ drawable->bitsPerPixel));
+#endif
+ return;
+ }
+#endif
+
+ pGC->pCompositeClip->extents.x1 += prgn->extents.x1;
+ pGC->pCompositeClip->extents.y1 += prgn->extents.y1;
+ pGC->pCompositeClip->extents.x2 += prgn->extents.x1;
+ pGC->pCompositeClip->extents.y2 += prgn->extents.y1;
+
+ if(pGC->pCompositeClip->extents.x2 > drawable->pScreen->width)
+ pGC->pCompositeClip->extents.x2 = drawable->pScreen->width;
+ if(pGC->pCompositeClip->extents.y2 > drawable->pScreen->height)
+ pGC->pCompositeClip->extents.y2 = drawable->pScreen->height;
+ }
+#endif
+
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" GC: %d %d %d %d\n",
+ pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
+ pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
+ pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
+#endif
+
numRects = RegionNumRects(prgn);
pbox = RegionRects(prgn);
for (i= numRects; --i >= 0; pbox++, prect++)
commit fc3904b6310322f62ba3884546a9cd00a9ecfde9
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Oct 30 14:55:06 2010 -0700
configure.ac: Add -fno-strict-aliasing to CFLAGS
This should address https://bugs.freedesktop.org/show_bug.cgi?id=31238
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index 22566c9..f3f298e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,12 @@ XORG_PROG_RAWCPP
# easier overrides at build time.
XSERVER_CFLAGS='$(CWARNFLAGS)'
+dnl Explicitly add -fno-strict-aliasing since this option should disappear
+dnl from util-macros CWARNFLAGS
+if test "x$GCC" = xyes ; then
+ XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
+fi
+
dnl Check for dtrace program (needed to build Xserver dtrace probes)
dnl Also checks for <sys/sdt.h>, since some Linux distros have an
dnl ISDN trace program named dtrace
commit 0364fc2a58b4dca5230fd4a2a4929c58f2f91678
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Jun 1 21:18:03 2011 -0700
XQuartz: ASL: Use xpbproxy subsystem for logging xpbproxy messages
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index a8c3a60..772c458 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -63,6 +63,17 @@ ErrorF(const char * f, ...)
va_end(args);
}
+/* TODO: Have this actually log to ASL */
+void xq_asl_log (int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...) {
+#ifdef DEBUG
+ va_list args;
+
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+#endif
+}
+
int main (int argc, const char *argv[]) {
const char *s;
int i;
diff --git a/hw/xquartz/pbproxy/pbproxy.h b/hw/xquartz/pbproxy/pbproxy.h
index fcbf4c4..35b15ae 100644
--- a/hw/xquartz/pbproxy/pbproxy.h
+++ b/hw/xquartz/pbproxy/pbproxy.h
@@ -80,13 +80,12 @@ extern BOOL xpbproxy_input_register (void);
/* os/log.c or app-main.m */
extern void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
-#ifdef DEBUG
-/* BEWARE: this can cause a string memory leak, according to the leaks program. */
-# define DebugF(msg, args...) ErrorF("%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args)
-#else
-# define DebugF(...) /* */
-#endif
+/* from darwin.h */
+_X_ATTRIBUTE_PRINTF(6,7)
+extern void xq_asl_log (int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...);
-#define TRACE() DebugF("TRACE\n")
+#define ASL_LOG(level, subsystem, msg, args...) xq_asl_log(level, subsystem, __FILE__, __FUNCTION__, __LINE__, msg, ##args)
+#define DebugF(msg, args...) ASL_LOG(ASL_LEVEL_DEBUG, "xpbproxy", msg, ##args)
+#define TRACE() DebugF("TRACE")
#endif /* PBPROXY_H */
commit 7dfd65705ccd3c6e2458d6892282520fe5ed8a6b
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Jun 1 21:06:53 2011 -0700
XQuartz: ASL: Use GLXAqua subsystem for logging GLXAqua messages
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index d15b9a3..c41840b 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -155,12 +155,8 @@ typedef long long GLint64EXT;
__GLXprovider * GlxGetDRISWrastProvider (void);
-// Write debugging output, or not
-#ifdef GLAQUA_DEBUG
-#define GLAQUA_DEBUG_MSG ErrorF
-#else
-#define GLAQUA_DEBUG_MSG(a, ...)
-#endif
+#include "darwin.h"
+#define GLAQUA_DEBUG_MSG(msg, args...) ASL_LOG(ASL_LEVEL_DEBUG, "GLXAqua", msg, ##args)
static void setup_dispatch_table(void);
GLuint __glFloorLog2(GLuint val);
commit 19020b23efa15d72349bd833aebddcc64780a615
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Jun 1 21:06:08 2011 -0700
XQuartz: ASL: Use xpr subsystem for logging xpr messages
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/xpr/xpr.h b/hw/xquartz/xpr/xpr.h
index ebd89de..0b138dd 100644
--- a/hw/xquartz/xpr/xpr.h
+++ b/hw/xquartz/xpr/xpr.h
@@ -33,6 +33,11 @@
#include "screenint.h"
#include <Xplugin.h>
+#include "darwin.h"
+
+#undef DEBUG_LOG
+#define DEBUG_LOG(msg, args...) ASL_LOG(ASL_LEVEL_DEBUG, "xpr", msg, ##args)
+
Bool QuartzModeBundleInit(void);
void AppleDRIExtensionInit(void);
diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 216678e..2b31865 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -37,7 +37,6 @@
#include "quartz.h"
#include "xpr.h"
-#include "darwin.h"
#include "darwinEvents.h"
#include <Xplugin.h>
diff --git a/hw/xquartz/xpr/xprEvent.c b/hw/xquartz/xpr/xprEvent.c
index cc86c47..4e7ece6 100644
--- a/hw/xquartz/xpr/xprEvent.c
+++ b/hw/xquartz/xpr/xprEvent.c
@@ -44,7 +44,6 @@
#include "scrnintstr.h"
#include "mipointer.h"
-#include "darwin.h"
#include "quartz.h"
#include "quartzKeyboard.h"
#include "darwinEvents.h"
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 98250e6..002355e 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -40,7 +40,6 @@
#include "xpr.h"
#include "xprEvent.h"
#include "pseudoramiX.h"
-#include "darwin.h"
#include "darwinEvents.h"
#include "rootless.h"
#include "dri.h"
commit a66400f8dba9b7c5b65f9d26996fff677c42d866
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Jun 1 20:45:58 2011 -0700
XQuartz: ASL: Update logging to support differnet levels and subsystems
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index fa8d4ce..29ab836 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -79,7 +79,7 @@
aslclient aslc;
-void debug_asl (const char *file, const char *function, int line, const char *fmt, ...) {
+void xq_asl_log (int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...) {
va_list args;
aslmsg msg = asl_new(ASL_TYPE_MSG);
@@ -93,10 +93,12 @@ void debug_asl (const char *file, const char *function, int line, const char *fm
asl_set(msg, "Line", _line);
free(_line);
}
+ if(subsystem)
+ asl_set(msg, "Subsystem", subsystem);
}
va_start(args, fmt);
- asl_vlog(aslc, msg, ASL_LEVEL_DEBUG, fmt, args);
+ asl_vlog(aslc, msg, level, fmt, args);
va_end(args);
if(msg)
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 659de43..aafc12f 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -76,9 +76,11 @@ extern int darwinMainScreenY;
// bundle-main.c
extern char *bundle_id_prefix;
-extern void debug_asl (const char *file, const char *function, int line, const char *fmt, ...) _X_ATTRIBUTE_PRINTF(4,5);
+_X_ATTRIBUTE_PRINTF(6,7)
+extern void xq_asl_log (int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...);
-#define DEBUG_LOG(msg, args...) debug_asl(__FILE__, __FUNCTION__, __LINE__, msg, ##args);
+#define ASL_LOG(level, subsystem, msg, args...) xq_asl_log(level, subsystem, __FILE__, __FUNCTION__, __LINE__, msg, ##args)
+#define DEBUG_LOG(msg, args...) ASL_LOG(ASL_LEVEL_DEBUG, "XQuartz", msg, ##args)
#define TRACE() DEBUG_LOG("TRACE")
#endif /* _DARWIN_H */
commit c0077b41b4c8bb08129db97a2a01d0af55d13fa4
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Jun 1 20:54:27 2011 -0700
XQuartz: Add a semicolon after DEBUG_LOG
Don't rely on the macro to provide it
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 7c41cbc..a51ee82 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -188,7 +188,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
- (void) activateX:(OSX_BOOL)state {
size_t i;
- DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
+ DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active);
if (state) {
if(bgMouseLocationUpdated) {
DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0, 0.0);
commit fbc8aae8e9b5c7b175073f02e79d7ff1d1363a31
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sun May 29 01:20:44 2011 -0700
XQuartz: Move -lXplugin to LDFLAGS from LDADD
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 1ce54ad..4b7b2bc 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -22,9 +22,10 @@ X11_bin_LDADD = \
$(top_builddir)/dix/dixfonts.lo \
$(top_builddir)/miext/rootless/librootless.la \
$(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \
- $(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
+ $(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS)
X11_bin_LDFLAGS = \
+ $(XSERVER_SYS_LIBS) -lXplugin \
-XCClinker -Objc \
-Wl,-u,_miDCInitialize \
-Wl,-framework,Carbon \
commit 38df706c6b8a339c4267cae7be0881c4362f36da
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue May 31 13:01:05 2011 -0700
XQuartz: GLX: Create a new dispatch table rather than modifying the existing one
Fixes regression introduced by b0c665ac0fe6840dda581e4d0d0b76c703d62a7b
0 X11.bin 0x0000000100118293 __glXAquaScreenCreateContext + 684
1 X11.bin 0x00000001001315b0 DoCreateContext + 163
2 X11.bin 0x000000010013509f __glXDispatch + 211
3 X11.bin 0x00000001000c7dad Dispatch + 785
4 X11.bin 0x00000001000b97e5 dix_main + 1022
5 X11.bin 0x00000001000122bc server_thread + 50
6 libSystem.B.dylib 0x00007fff836554f6 _pthread_start + 331
7 libSystem.B.dylib 0x00007fff836553a9 thread_start + 13
http://lists.apple.com/archives/X11-users/2011/May/msg00045.html
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 6da27c7..d15b9a3 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -666,7 +666,15 @@ GLuint __glFloorLog2(GLuint val)
}
static void setup_dispatch_table(void) {
- struct _glapi_table *disp=_glapi_get_dispatch();
+ static struct _glapi_table *disp = NULL;
+
+ if(disp) {
+ _glapi_set_dispatch(disp);
+ return;
+ }
+
+ disp=calloc(1,sizeof(struct _glapi_table));
+ assert(disp);
/* to update:
* for f in $(grep 'define SET_' ../../../glx/dispatch.h | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy
@@ -1610,4 +1618,6 @@ static void setup_dispatch_table(void) {
SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS);
SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX);
#endif
+
+ _glapi_set_dispatch(disp);
}
commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a
Author: Marko Macek <Marko.Macek at gmx.net>
Date: Sat May 21 13:30:59 2011 +0100
DIX: Set backgroundState correctly for root window
When we change the root window's background to None, and we've run with
-wr or -br for a forced solid background, make sure we also change the
background state to BackgroundPixel, so we don't try to lookup either
pScreen->whitePixel or pScreen->blackPixel as a pixmap.
Signed-off-by: Marko Macek <Marko.Macek at gmx.net>
Reviewed-by: Walter Harms <wharms at bfs.de>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/window.c b/dix/window.c
index cd28d05..5defe58 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -475,6 +475,7 @@ InitRootWindow(WindowPtr pWin)
pWin->background.pixel = pScreen->whitePixel;
backFlag |= CWBackPixmap;
} else {
+ pWin->backgroundState = BackgroundPixel;
if (whiteRoot)
pWin->background.pixel = pScreen->whitePixel;
else
@@ -973,6 +974,7 @@ SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2)
else if (party_like_its_1989)
MakeRootTile(pWin);
else {
+ pWin->backgroundState = BackgroundPixel;
if (whiteRoot)
pWin->background.pixel = pScreen->whitePixel;
else
More information about the Xquartz-changes
mailing list