diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-01-30 18:40:46 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2009-02-06 18:42:38 +0100 |
commit | 6483834200fab90164c27c72d4710014edeb4479 (patch) | |
tree | 431a10b37b8ad6b65f70da41b0040e568ebbec38 /exa | |
parent | f112d6bf59964f317ab236221f7bce7fe2603ab8 (diff) |
exa: Remove one of the many calls directly into the fb layer.
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa_accel.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index f72a08ac3..b70222a3a 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -149,6 +149,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int xoff, yoff; int bpp = pDrawable->bitsPerPixel; Bool access_prepared = FALSE; + Bool ret = TRUE; if (pExaPixmap->accel_blocked) return FALSE; @@ -210,33 +211,12 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff, x2 - x1, y2 - y1, src, src_stride); - /* If we fail to accelerate the upload, fall back to using unaccelerated - * fb calls. + /* We have to fall back completely, and ignore what has already been completed. + * Messing with the fb layer directly like we used to is completely unacceptable. */ if (!ok) { - FbStip *dst; - FbStride dst_stride; - int dstBpp; - int dstXoff, dstYoff; - - if (!access_prepared) { - ExaDoPrepareAccess(pDrawable, EXA_PREPARE_DEST); - - access_prepared = TRUE; - } - - fbGetStipDrawable(pDrawable, dst, dst_stride, dstBpp, - dstXoff, dstYoff); - - fbBltStip((FbStip *)bits + (y1 - y) * (src_stride / sizeof(FbStip)), - src_stride / sizeof(FbStip), - (x1 - x) * dstBpp, - dst + (y1 + dstYoff) * dst_stride, - dst_stride, - (x1 + dstXoff) * dstBpp, - (x2 - x1) * dstBpp, - y2 - y1, - GXcopy, FB_ALLONES, dstBpp); + ret = FALSE; + break; } } @@ -245,7 +225,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, else exaMarkSync(pDrawable->pScreen); - return TRUE; + return ret; } static void |