xserver: Branch 'master' - 2 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Sep 23 04:11:54 PDT 2009


 exa/exa_glyphs.c |    2 --
 exa/exa_mixed.c  |    4 +---
 exa/exa_render.c |   12 +++++++-----
 render/picture.c |    5 +----
 4 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit ce1fe8ddb4a4dbe6cfd909e5b1b73b459d742bec
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Sep 23 13:10:05 2009 +0200

    render: Don't add b8g8r8x8 format for depth 24.
    
    The components are required to be packed in the bottom of the pixel, so this
    format can't fit in depth 24.
    
    Also fix up a comment for the addition of BGRA formats.

diff --git a/render/picture.c b/render/picture.c
index a367077..e1a2972 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -223,9 +223,8 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
 	    b = Ones (pVisual->blueMask);
 	    type = PICT_TYPE_OTHER;
 	    /*
-	     * Current rendering code supports only two direct formats,
+	     * Current rendering code supports only three direct formats,
 	     * fields must be packed together at the bottom of the pixel
-	     * and must be either RGB or BGR
 	     */
 	    if (pVisual->offsetBlue == 0 &&
 		pVisual->offsetGreen == b &&
@@ -322,8 +321,6 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
 				      PICT_x8r8g8b8, pDepth->depth);
 		nformats = addFormat (formats, nformats,
 				      PICT_x8b8g8r8, pDepth->depth);
-		nformats = addFormat (formats, nformats,
-				      PICT_b8g8r8x8, pDepth->depth);
 	    }
 	    if (pDepth->depth >= 30)
 	    {
commit 096f21bb7a1217443d8a03529b1a2938518eb24f
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Sep 23 08:24:06 2009 +0200

    EXA: Fix some issues pointed out by clang.
    
    Remove dead variables, fix use of uninitialized values, that kind of thing.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index d621ccf..bf097c3 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -701,7 +701,6 @@ exaGlyphs (CARD8 	 op,
 	   GlyphListPtr	 list,
 	   GlyphPtr	*glyphs)
 {
-    PicturePtr	pPicture;
     PixmapPtr   pMaskPixmap = 0;
     PicturePtr  pMask = NULL;
     ScreenPtr   pScreen = pDst->pDrawable->pScreen;
@@ -803,7 +802,6 @@ exaGlyphs (CARD8 	 op,
 	while (n--)
 	{
 	    glyph = *glyphs++;
-	    pPicture = GlyphPicture (glyph)[pScreen->myNum];
 
 	    if (glyph->info.width > 0 && glyph->info.height > 0)
 	    {
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 01f87ba..6aa73f2 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -57,7 +57,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
     PixmapPtr pPixmap;
     ExaPixmapPrivPtr	pExaPixmap;
     int bpp;
-    size_t paddedWidth, datasize;
+    size_t paddedWidth;
     ExaScreenPriv(pScreen);
 
     if (w > 32767 || h > 32767)
@@ -79,8 +79,6 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
     if (paddedWidth / 4 > 32767 || h > 32767)
         return NullPixmap;
 
-    datasize = h * paddedWidth;
-
     /* We will allocate the system pixmap later if needed. */
     pPixmap->devPrivate.ptr = NULL;
     pExaPixmap->sys_ptr = NULL;
diff --git a/exa/exa_render.c b/exa/exa_render.c
index d469301..1c18566 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -266,6 +266,10 @@ exaTryDriverSolidFill(PicturePtr	pSrc,
 
     xDst += pDst->pDrawable->x;
     yDst += pDst->pDrawable->y;
+    if (pSrc->pDrawable) {
+	xSrc += pSrc->pDrawable->x;
+	ySrc += pSrc->pDrawable->y;
+    }
 
     if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
 				   xSrc, ySrc, 0, 0, xDst, yDst,
@@ -277,9 +281,6 @@ exaTryDriverSolidFill(PicturePtr	pSrc,
     REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
 
     if (pSrc->pDrawable) {
-	xSrc += pSrc->pDrawable->x;
-	ySrc += pSrc->pDrawable->y;
-
 	pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
 	pixel = exaGetPixmapFirstPixel (pSrcPix);
     } else
@@ -340,7 +341,8 @@ exaTryDriverCompositeRects(CARD8	       op,
 			   ExaCompositeRectPtr rects)
 {
     ExaScreenPriv (pDst->pDrawable->pScreen);
-    int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
+    int src_off_x = 0, src_off_y = 0, mask_off_x = 0, mask_off_y = 0;
+    int dst_off_x, dst_off_y;
     PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
     ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;
 
@@ -656,7 +658,7 @@ exaTryDriverComposite(CARD8		op,
      */
     if (pDstExaPix->accel_blocked ||
 	(pSrcExaPix && pSrcExaPix->accel_blocked) ||
-	(pMask && (pMaskExaPix->accel_blocked)))
+	(pMaskExaPix && (pMaskExaPix->accel_blocked)))
     {
 	return -1;
     }


More information about the xorg-commit mailing list