Commit f7207bcd authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Lift fb to xorg-xserver-7.1/1.1 state

Fixes ArcticaProject/nx-libs#640
parent b1c42dc9
......@@ -26,6 +26,7 @@
#include <dix-config.h>
#endif
#include <string.h>
#include "fb.h"
#define InitializeShifts(sx,dx,ls,rs) { \
......@@ -76,6 +77,29 @@ fbBlt (FbBits *srcLine,
return;
}
#endif
if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
!(srcX & 7) && !(dstX & 7) && !(width & 7)) {
int i;
CARD8 *src = (CARD8 *) srcLine;
CARD8 *dst = (CARD8 *) dstLine;
srcStride *= sizeof(FbBits);
dstStride *= sizeof(FbBits);
width >>= 3;
src += (srcX >> 3);
dst += (dstX >> 3);
if (!upsidedown)
for (i = 0; i < height; i++)
memcpy(dst + i * dstStride, src + i * srcStride, width);
else
for (i = height - 1; i >= 0; i--)
memcpy(dst + i * dstStride, src + i * srcStride, width);
return;
}
FbInitializeMergeRop(alu, pm);
destInvarient = FbDestInvarientMergeRop();
if (upsidedown)
......
......@@ -98,9 +98,13 @@ fbPadPixmap (PixmapPtr pPixmap)
FbBits mask;
int height;
int w;
int stride;
int bpp;
_X_UNUSED int xOff, yOff;
fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff);
width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel;
bits = pPixmap->devPrivate.ptr;
height = pPixmap->drawable.height;
mask = FbBitsMask (0, width);
while (height--)
......@@ -112,7 +116,8 @@ fbPadPixmap (PixmapPtr pPixmap)
b = b | FbScrRight(b, w);
w <<= 1;
}
*bits++ = b;
*bits = b;
bits += stride;
}
}
......
......@@ -171,7 +171,7 @@
x = (x + ((x >> 8) & 0xff00ff)) >> 8; \
x &= 0xff00ff; \
x += (y >> 8) & 0xff00ff; \
x |= 0x1000100 - ((t >> 8) & 0xff00ff); \
x |= 0x1000100 - ((x >> 8) & 0xff00ff); \
x &= 0xff00ff; \
x <<= 8; \
x += t; \
......
/*
*
* Copyright © 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
......@@ -98,6 +99,15 @@ typedef struct _Picture *PicturePtr;
#define PICT_c8 PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_g8 PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
#define PICT_x4a4 PICT_FORMAT(8,PICT_TYPE_A,4,0,0,0)
#define PICT_x4r1g2b1 PICT_FORMAT(8,PICT_TYPE_ARGB,0,1,2,1)
#define PICT_x4b1g2r1 PICT_FORMAT(8,PICT_TYPE_ABGR,0,1,2,1)
#define PICT_x4a1r1g1b1 PICT_FORMAT(8,PICT_TYPE_ARGB,1,1,1,1)
#define PICT_x4a1b1g1r1 PICT_FORMAT(8,PICT_TYPE_ABGR,1,1,1,1)
#define PICT_x4c4 PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_x4g4 PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
/* 4bpp formats */
#define PICT_a4 PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
#define PICT_r1g2b1 PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)
......
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