[Xquartz-changes] xserver: Branch 'master' - 8 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Fri Dec 11 17:34:09 PST 2009


Rebased ref, commits from common ancestor:
commit d94cbc7458642ed6180fcfddab66a899b59a46b4
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Dec 11 16:42:43 2009 -0800

    Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS
    
    This is not portable, and accodring to Paulo should not be required any more.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>

diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am
index 71b24b7..be0fa42 100644
--- a/hw/kdrive/fake/Makefile.am
+++ b/hw/kdrive/fake/Makefile.am
@@ -20,7 +20,7 @@ Xfake_LDADD = 						\
 	libfake.la					\
 	@KDRIVE_LIBS@
 
-Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -Wl,-undefined=InitExtensions
+Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
 Xfake_DEPENDENCIES =	\
 	libfake.la					\
commit 5582dc06204b93bb892233509fdb6ccd0a4f856d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Dec 11 11:53:28 2009 -0800

    dtrace: Add Xserver-dtrace.h to CLEANFILES
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at sun.com>

diff --git a/dix/Makefile.am b/dix/Makefile.am
index b29f2e1..42b5121 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -70,4 +70,4 @@ endif
 dix.c:
 	touch $@
 
-CLEANFILES = dix.c
+CLEANFILES = dix.c Xserver-dtrace.h
commit a72c65e9176c51de95db2fdbf4c5d946a4911695
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Dec 2 08:37:20 2009 -0800

    fb: Adjust transform or composite coordinates for pixman operations
    
    Windows (or even pixmaps, in some cases) may not sit at the origin of
    the containing pixmap, so any coordinates relative to the drawable
    must be adjusted. For destinations and untransformed sources, the
    operation coordinates are adjusted. For transformed sources, the
    transform matrix is adjusted.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fb.h b/fb/fb.h
index ed21f9e..02d6c03 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2082,8 +2082,11 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
 		   FbBits	xor);
 
 extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr pict,
-		 Bool       has_clip);
+image_from_pict (PicturePtr	pict,
+		 Bool		has_clip,
+		 int		*xoff,
+		 int		*yoff);
+
 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 07a2286..251754b 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -158,19 +158,24 @@ 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, xSrc - xDst, ySrc - yDst, width, height);
     if (pMask)
 	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
     
-    src = image_from_pict (pSrc, TRUE);
-    mask = image_from_pict (pMask, TRUE);
-    dest = image_from_pict (pDst, TRUE);
+    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);
 
     if (src && dest && !(pMask && !mask))
     {
 	pixman_image_composite (op, src, mask, dest,
-				xSrc, ySrc, xMask, yMask, xDst, yDst,
+				xSrc + src_xoff, ySrc + src_yoff,
+				xMask + msk_xoff, yMask + msk_yoff,
+				xDst + dst_xoff, yDst + dst_yoff,
 				width, height);
     }
 
@@ -270,22 +275,22 @@ create_conical_gradient_image (PictGradient *gradient)
 
 static pixman_image_t *
 create_bits_picture (PicturePtr pict,
-		     Bool       has_clip)
+		     Bool       has_clip,
+		     int	*xoff,
+		     int	*yoff)
 {
+    PixmapPtr pixmap;
     FbBits *bits;
     FbStride stride;
-    int bpp, xoff, yoff;
+    int bpp;
     pixman_image_t *image;
     
-    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));
+    fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
+    fbGetPixmapBitsData(pixmap, bits, stride, bpp);
 
     image = pixman_image_create_bits (
 	pict->format,
-	pict->pDrawable->width, pict->pDrawable->height,
+	pixmap->drawable.width, pixmap->drawable.height,
 	(uint32_t *)bits, stride * sizeof (FbStride));
     
     
@@ -311,30 +316,52 @@ create_bits_picture (PicturePtr pict,
 	if (pict->clientClipType != CT_NONE)
 	    pixman_image_set_has_client_clip (image, TRUE);
 
-	pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
+	if (*xoff || *yoff)
+	    pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
 
 	pixman_image_set_clip_region (image, pict->pCompositeClip);
 
-	pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
+	if (*xoff || *yoff)
+	    pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
     }
     
     /* 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 void
-set_image_properties (pixman_image_t *image, PicturePtr pict)
+set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
 {
     pixman_repeat_t repeat;
     pixman_filter_t filter;
     
     if (pict->transform)
     {
-	pixman_image_set_transform (
-	    image, (pixman_transform_t *)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);
     }
     
     switch (pict->repeatType)
@@ -361,7 +388,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
     
     if (pict->alphaMap)
     {
-	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
+	int alpha_xoff, alpha_yoff;
+	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
 	
 	pixman_image_set_alpha_map (
 	    image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -394,8 +422,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
 }
 
 pixman_image_t *
-image_from_pict (PicturePtr pict,
-		 Bool has_clip)
+image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
 {
     pixman_image_t *image = NULL;
 
@@ -404,7 +431,7 @@ image_from_pict (PicturePtr pict,
 
     if (pict->pDrawable)
     {
-	image = create_bits_picture (pict, has_clip);
+	image = create_bits_picture (pict, has_clip, xoff, yoff);
     }
     else if (pict->pSourcePict)
     {
@@ -428,7 +455,7 @@ image_from_pict (PicturePtr pict,
     }
     
     if (image)
-	set_image_properties (image, pict);
+	set_image_properties (image, pict, has_clip, xoff, yoff);
     
     return image;
 }
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 830603a..515e2e1 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -40,7 +40,8 @@ fbAddTraps (PicturePtr	pPicture,
 	    int		ntrap,
 	    xTrap	*traps)
 {
-    pixman_image_t *image = image_from_pict (pPicture, FALSE);
+    int image_xoff, image_yoff;
+    pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
 
     if (!image)
 	return;
@@ -56,7 +57,8 @@ fbRasterizeTrapezoid (PicturePtr    pPicture,
 		      int	    x_off,
 		      int	    y_off)
 {
-    pixman_image_t *image = image_from_pict (pPicture, FALSE);
+    int	mask_xoff, mask_yoff;
+    pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
 
     if (!image)
 	return;
commit bd567061c8b84b268d9bbb01bc4d8981feefb862
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Dec 2 15:51:22 2009 -0800

    Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsData
    
    These two sub-macros each perform half of the original macro work and
    the old macro is now implemented in terms of the new ones. This makes
    way for new code which wants to know the underlying pixmap for a
    window instead of just getting a pointer to the bits.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fb.h b/fb/fb.h
index 6c9f8a1..ed21f9e 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -700,38 +700,41 @@ typedef struct {
 #define __fbPixOffXPix(pPix)	(__fbPixDrawableX(pPix))
 #define __fbPixOffYPix(pPix)	(__fbPixDrawableY(pPix))
 
-#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
-    PixmapPtr   _pPix; \
-    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
-	_pPix = fbGetWindowPixmap(pDrawable); \
-	(xoff) = __fbPixOffXWin(_pPix); \
-	(yoff) = __fbPixOffYWin(_pPix); \
-    } else { \
-	_pPix = (PixmapPtr) (pDrawable); \
-	(xoff) = __fbPixOffXPix(_pPix); \
-	(yoff) = __fbPixOffYPix(_pPix); \
-    } \
-    fbPrepareAccess(pDrawable); \
-    (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
-    (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
-    (bpp) = _pPix->drawable.bitsPerPixel;  (void)(bpp); \
+#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) {			\
+    if ((pDrawable)->type != DRAWABLE_PIXMAP) { 				\
+	(pixmap) = fbGetWindowPixmap(pDrawable);				\
+	(xoff) = __fbPixOffXWin(pixmap); 					\
+	(yoff) = __fbPixOffYWin(pixmap); 					\
+    } else { 									\
+	(pixmap) = (PixmapPtr) (pDrawable);					\
+	(xoff) = __fbPixOffXPix(pixmap); 					\
+	(yoff) = __fbPixOffYPix(pixmap); 					\
+    } 										\
+    fbPrepareAccess(pDrawable); 						\
 }
 
-#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
-    PixmapPtr   _pPix; \
-    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
-	_pPix = fbGetWindowPixmap(pDrawable); \
-	(xoff) = __fbPixOffXWin(_pPix); \
-	(yoff) = __fbPixOffYWin(_pPix); \
-    } else { \
-	_pPix = (PixmapPtr) (pDrawable); \
-	(xoff) = __fbPixOffXPix(_pPix); \
-	(yoff) = __fbPixOffYPix(_pPix); \
-    } \
-    fbPrepareAccess(pDrawable); \
-    (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
-    (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
-    (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) {			\
+    (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; 			       	\
+    (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride);	\
+    (bpp) = (pixmap)->drawable.bitsPerPixel;  (void)(bpp); 			\
+}
+
+#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) {			\
+    (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; 			       	\
+    (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride);	\
+    (bpp) = (pixmap)->drawable.bitsPerPixel;  (void)(bpp); 			\
+}
+
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { 		\
+    PixmapPtr   _pPix; 								\
+    fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); 				\
+    fbGetPixmapBitsData(_pPix, pointer, stride, bpp);				\
+}
+
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { 	\
+    PixmapPtr   _pPix; 								\
+    fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff);				\
+    fbGetPixmapStipData(_pPix, pointer, stride, bpp);				\
 }
 
 /*
commit 61335052972a78d67c0ba74f902273b34c63a198
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 1 11:09:32 2009 -0800

    Revert "Fix clipping when windows are used as sources"
    
    This reverts commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d.
    
    Conflicts:
    
    	fb/fbpict.c
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fb.h b/fb/fb.h
index c35e765..6c9f8a1 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2080,8 +2080,7 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
 
 extern _X_EXPORT pixman_image_t *
 image_from_pict (PicturePtr pict,
-		 Bool       has_clip,
-		 Bool	    is_src);
+		 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 5d3708c..07a2286 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -163,9 +163,9 @@ fbComposite (CARD8      op,
     if (pMask)
 	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
     
-    src = image_from_pict (pSrc, TRUE, TRUE);
-    mask = image_from_pict (pMask, TRUE, TRUE);
-    dest = image_from_pict (pDst, TRUE, FALSE);
+    src = image_from_pict (pSrc, TRUE);
+    mask = image_from_pict (pMask, TRUE);
+    dest = image_from_pict (pDst, TRUE);
 
     if (src && dest && !(pMask && !mask))
     {
@@ -268,79 +268,24 @@ create_conical_gradient_image (PictGradient *gradient)
 	gradient->nstops);
 }
 
-static DrawablePtr 
-copy_drawable (DrawablePtr pDraw)
-{
-    ScreenPtr pScreen = pDraw->pScreen;
-    PixmapPtr pPixmap;
-    GCPtr pGC;
-    int width, height;
-    ChangeGCVal gcv[1];
-    
-    width = pDraw->width;
-    height = pDraw->height;
-    
-    pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pDraw->depth, 0);
-    
-    if (!pPixmap)
-	return NULL;
-    
-    pGC = GetScratchGC (pDraw->depth, pScreen);
-    
-    if (!pGC)
-    {
-	(*pScreen->DestroyPixmap) (pPixmap);
-	return NULL;
-    }
-    
-    /* First fill the pixmap with zeros */
-    gcv[0].val = 0x00000000;
-    dixChangeGC (NullClient, pGC, GCBackground, NULL, gcv);
-    ValidateGC ((DrawablePtr)pPixmap, pGC);
-    miClearDrawable ((DrawablePtr)pPixmap, pGC);
-    
-    /* Then copy the window there */
-    ValidateGC(&pPixmap->drawable, pGC);
-    (* pGC->ops->CopyArea) (pDraw, &pPixmap->drawable, pGC, 0, 0, width, height, 0, 0);
-    
-    FreeScratchGC (pGC);
-    
-    return &pPixmap->drawable;
-}
-
-static void
-destroy_drawable (pixman_image_t *image, void *data)
-{
-    DrawablePtr pDrawable = data;
-    ScreenPtr pScreen = pDrawable->pScreen;
-
-    pScreen->DestroyPixmap ((PixmapPtr)pDrawable);
-}
-
 static pixman_image_t *
 create_bits_picture (PicturePtr pict,
-		     Bool	has_clip,
-		     Bool       is_src)
+		     Bool       has_clip)
 {
     FbBits *bits;
     FbStride stride;
     int bpp, xoff, yoff;
     pixman_image_t *image;
-    DrawablePtr drawable;
-
-    if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW)
-	drawable = copy_drawable (pict->pDrawable);
-    else
-	drawable = pict->pDrawable;
     
-    fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);
+    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
 
     bits = (FbBits*)((CARD8*)bits +
-		     (drawable->y + yoff) * stride * sizeof(FbBits) +
-		     (drawable->x + xoff) * (bpp / 8));
+		     (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
+		     (pict->pDrawable->x + xoff) * (bpp / 8));
 
     image = pixman_image_create_bits (
-	pict->format, drawable->width, drawable->height,
+	pict->format,
+	pict->pDrawable->width, pict->pDrawable->height,
 	(uint32_t *)bits, stride * sizeof (FbStride));
     
     
@@ -358,46 +303,25 @@ create_bits_picture (PicturePtr pict,
 #endif
 #endif
     
+    /* pCompositeClip is undefined for source pictures, so
+     * only set the clip region for pictures with drawables
+     */
     if (has_clip)
     {
-	if (is_src)
-	{
-	    if (pict->clientClipType != CT_NONE)
-	    {
-		pixman_image_set_has_client_clip (image, TRUE);
+	if (pict->clientClipType != CT_NONE)
+	    pixman_image_set_has_client_clip (image, TRUE);
 
-		pixman_region_translate (pict->clientClip,
-					 pict->clipOrigin.x,
-					 pict->clipOrigin.y);
-		
-		pixman_image_set_clip_region (image, pict->clientClip);
+	pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
 
-		pixman_region_translate (pict->clientClip,
-					 - pict->clipOrigin.x,
-					 - pict->clipOrigin.y);
-	    }
-	}
-	else
-	{
-	    pixman_region_translate (pict->pCompositeClip,
-				     - pict->pDrawable->x,
-				     - pict->pDrawable->y);
+	pixman_image_set_clip_region (image, pict->pCompositeClip);
 
-	    pixman_image_set_clip_region (image, pict->pCompositeClip);
-	    
-	    pixman_region_translate (pict->pCompositeClip,
-				     pict->pDrawable->x,
-				     pict->pDrawable->y);
-	}
+	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);
 
-    if (drawable != pict->pDrawable)
-	pixman_image_set_destroy_function (image, destroy_drawable, drawable);
-    
     return image;
 }
 
@@ -437,7 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
     
     if (pict->alphaMap)
     {
-	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE, TRUE);
+	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
 	
 	pixman_image_set_alpha_map (
 	    image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -471,8 +395,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
 
 pixman_image_t *
 image_from_pict (PicturePtr pict,
-		 Bool has_clip,
-		 Bool is_src)
+		 Bool has_clip)
 {
     pixman_image_t *image = NULL;
 
@@ -481,7 +404,7 @@ image_from_pict (PicturePtr pict,
 
     if (pict->pDrawable)
     {
-	image = create_bits_picture (pict, has_clip, is_src);
+	image = create_bits_picture (pict, has_clip);
     }
     else if (pict->pSourcePict)
     {
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index b1e1eff..830603a 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -40,7 +40,7 @@ fbAddTraps (PicturePtr	pPicture,
 	    int		ntrap,
 	    xTrap	*traps)
 {
-    pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
+    pixman_image_t *image = image_from_pict (pPicture, FALSE);
 
     if (!image)
 	return;
@@ -56,7 +56,7 @@ fbRasterizeTrapezoid (PicturePtr    pPicture,
 		      int	    x_off,
 		      int	    y_off)
 {
-    pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
+    pixman_image_t *image = image_from_pict (pPicture, FALSE);
 
     if (!image)
 	return;
commit 071b3c1810d9f2602173acc8578caac20e0b771e
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 1 11:05:04 2009 -0800

    Revert "Use IncludeInferiors when copying windows before compositing."
    
    This reverts commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fbpict.c b/fb/fbpict.c
index 18ef2e1..5d3708c 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -159,9 +159,9 @@ fbComposite (CARD8      op,
 {
     pixman_image_t *src, *mask, *dest;
     
-    miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
+    miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
     if (pMask)
-	miCompositeSourceValidate (pMask, xMask, yMask, width, height);
+	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
     
     src = image_from_pict (pSrc, TRUE, TRUE);
     mask = image_from_pict (pMask, TRUE, TRUE);
@@ -295,8 +295,7 @@ copy_drawable (DrawablePtr pDraw)
     
     /* First fill the pixmap with zeros */
     gcv[0].val = 0x00000000;
-    gcv[1].val = IncludeInferiors;
-    dixChangeGC (NullClient, pGC, GCBackground | GCSubwindowMode, NULL, gcv);
+    dixChangeGC (NullClient, pGC, GCBackground, NULL, gcv);
     ValidateGC ((DrawablePtr)pPixmap, pGC);
     miClearDrawable ((DrawablePtr)pPixmap, pGC);
     
commit 8e640d6b131d2865a9725d8997023865b0ef3d69
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 1 11:04:49 2009 -0800

    Revert "Reserve space for two GC values in copy_drawable()."
    
    This reverts commit 08df24555cb432eb0d90a3f63275e9485e777c4c.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fbpict.c b/fb/fbpict.c
index 2fbef15..18ef2e1 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -275,7 +275,7 @@ copy_drawable (DrawablePtr pDraw)
     PixmapPtr pPixmap;
     GCPtr pGC;
     int width, height;
-    ChangeGCVal gcv[2];
+    ChangeGCVal gcv[1];
     
     width = pDraw->width;
     height = pDraw->height;
commit 0816c5482c25251da8af5978cc348e1c547bf731
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 1 11:04:06 2009 -0800

    Revert "fb: Don't crash if copy_drawable() returns NULL."
    
    This reverts commit 66a9616d645f5a23225251d197e00b94c79274f6.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Acked-by: Soeren Sandmann <sandmann at daimi.au.dk>

diff --git a/fb/fbpict.c b/fb/fbpict.c
index 7ae3ec5..2fbef15 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -329,11 +329,9 @@ create_bits_picture (PicturePtr pict,
     pixman_image_t *image;
     DrawablePtr drawable;
 
-    if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) {
+    if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW)
 	drawable = copy_drawable (pict->pDrawable);
-	if (!drawable)
-	    return NULL;
-    } else
+    else
 	drawable = pict->pDrawable;
     
     fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);


More information about the Xquartz-changes mailing list