Commit 60291865 authored by Siarhei Siamashka's avatar Siarhei Siamashka
Browse files

G2D: enable accelerated blits for 16bpp color depth



This is still not perfect, because G2D can't saturate memory bandwidth
for this color depth (it is fillrate limited). We should emulate 16bpp blits
with 32bpp blits whenever it is possible.
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
parent 5f964213
......@@ -68,7 +68,7 @@ xCopyWindowProc(DrawablePtr pSrcDrawable,
fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
if (srcBpp == 32 && dstBpp == 32 &&
if (srcBpp == dstBpp && (srcBpp == 32 || srcBpp == 16) &&
disp->framebuffer_addr == (void *)src &&
disp->framebuffer_addr == (void *)dst &&
(dy + srcYoff != dstYoff || dx + srcXoff + 1 >= dstXoff))
......@@ -215,7 +215,7 @@ xCopyArea(DrawablePtr pSrcDrawable,
if (pm == FB_ALLONES && alu == GXcopy &&
pSrcDrawable->bitsPerPixel == pDstDrawable->bitsPerPixel &&
pSrcDrawable->bitsPerPixel == 32)
(pSrcDrawable->bitsPerPixel == 32 || pSrcDrawable->bitsPerPixel == 16))
{
return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
widthSrc, heightSrc, xOut, yOut, xCopyNtoN, 0, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment