xf86-video-intel: uxa/uxa-accel.c

Eric Anholt anholt at kemper.freedesktop.org
Mon Apr 12 13:48:17 PDT 2010


 uxa/uxa-accel.c |   51 ++++++++-------------------------------------------
 1 file changed, 8 insertions(+), 43 deletions(-)

New commits:
commit 6d50553e8f70d8f2142efdfd6c90bc27a599d0bc
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Apr 12 13:44:31 2010 -0700

    Revert "uxa: Try using put_image when copying from a memory buffer."
    
    This reverts commit 27195d7dba0f3ff08b92f3fd916cdf5113cbef58.
    put_image often calls copy_area. Which calls put_image.  Exhausting of
    the stack follows.

diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 4f7fd41..cd3e477 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -450,19 +450,18 @@ uxa_copy_n_to_n(DrawablePtr pSrcDrawable,
 		goto fallback;
 	}
 
-	if (!uxa_pixmap_is_offscreen(pDstPixmap))
-	    goto fallback;
-
-	if (uxa_pixmap_is_offscreen(pSrcPixmap)) {
-	    if (!(*uxa_screen->info->prepare_copy) (pSrcPixmap, pDstPixmap,
+	if (!uxa_pixmap_is_offscreen(pSrcPixmap) ||
+	    !uxa_pixmap_is_offscreen(pDstPixmap) ||
+	    !(*uxa_screen->info->prepare_copy) (pSrcPixmap, pDstPixmap,
 						reverse ? -1 : 1,
 						upsidedown ? -1 : 1,
 						pGC ? pGC->alu : GXcopy,
 						pGC ? pGC->
-						planemask : FB_ALLONES))
+						planemask : FB_ALLONES)) {
 		goto fallback;
+	}
 
-	    while (nbox--) {
+	while (nbox--) {
 		(*uxa_screen->info->copy) (pDstPixmap,
 					   pbox->x1 + dx + src_off_x,
 					   pbox->y1 + dy + src_off_y,
@@ -471,44 +470,10 @@ uxa_copy_n_to_n(DrawablePtr pSrcDrawable,
 					   pbox->x2 - pbox->x1,
 					   pbox->y2 - pbox->y1);
 		pbox++;
-	    }
-
-	    (*uxa_screen->info->done_copy) (pDstPixmap);
-	} else {
-	    int stride, bpp;
-	    char *src;
-
-	    if (!uxa_screen->info->put_image)
-		goto fallback;
-
-	    /* Don't bother with under 8bpp, XYPixmaps. */
-	    bpp = pSrcPixmap->drawable.bitsPerPixel;
-	    if (bpp != pDstDrawable->bitsPerPixel || bpp < 8)
-		goto fallback;
-
-	    /* Only accelerate copies: no rop or planemask. */
-	    if (pGC && (!UXA_PM_IS_SOLID(pSrcDrawable, pGC->planemask) || pGC->alu != GXcopy))
-		goto fallback;
-
-	    src = pSrcPixmap->devPrivate.ptr;
-	    stride = pSrcPixmap->devKind;
-	    bpp /= 8;
-	    while (nbox--) {
-		if (!uxa_screen->info->put_image(pDstPixmap,
-						 pbox->x1 + dst_off_x,
-						 pbox->y1 + dst_off_y,
-						 pbox->x2 - pbox->x1,
-						 pbox->y2 - pbox->y1,
-						 (char *) src +
-						 (pbox->y1 + dy + src_off_y) * stride +
-						 (pbox->x1 + dx + src_off_x) * bpp,
-						 stride))
-		    goto fallback;
-
-		pbox++;
-	    }
 	}
 
+	(*uxa_screen->info->done_copy) (pDstPixmap);
+
 	return;
 
 fallback:


More information about the xorg-commit mailing list