exa: Remove one of the many calls directly into the fb layer.
This commit is contained in:
parent
f112d6bf59
commit
6483834200
|
@ -149,6 +149,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
int bpp = pDrawable->bitsPerPixel;
|
int bpp = pDrawable->bitsPerPixel;
|
||||||
Bool access_prepared = FALSE;
|
Bool access_prepared = FALSE;
|
||||||
|
Bool ret = TRUE;
|
||||||
|
|
||||||
if (pExaPixmap->accel_blocked)
|
if (pExaPixmap->accel_blocked)
|
||||||
return FALSE;
|
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);
|
src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8);
|
||||||
ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff,
|
ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff,
|
||||||
x2 - x1, y2 - y1, src, src_stride);
|
x2 - x1, y2 - y1, src, src_stride);
|
||||||
/* If we fail to accelerate the upload, fall back to using unaccelerated
|
/* We have to fall back completely, and ignore what has already been completed.
|
||||||
* fb calls.
|
* Messing with the fb layer directly like we used to is completely unacceptable.
|
||||||
*/
|
*/
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
FbStip *dst;
|
ret = FALSE;
|
||||||
FbStride dst_stride;
|
break;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +225,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
else
|
else
|
||||||
exaMarkSync(pDrawable->pScreen);
|
exaMarkSync(pDrawable->pScreen);
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue