From a1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 29 Nov 2014 12:40:08 +0100 Subject: fontconfig libX11 libxcb libxcb/xcb-proto mesa xserver xkbcomp xkeyboard-config git update 29 Nov 2014 xserver commit c52a2b1ebad56820af932dfbc871701a8b04fd9c libxcb commit bbca7b82f803fa13fd30a2891ec06f2a213a28c2 libxcb/xcb-proto commit 691d2b97e5989d6d7006304d81bd8fa128477ca1 xkeyboard-config commit b664d7fb8aab9b0f834dd9c81d273c7809561b34 libX11 commit f3831dde6972e4da9e018c6a5f4013d8756a5e78 xkbcomp commit 1e8ee9d0aad072f04186df84752f5636340574e0 fontconfig commit b732bf057f4b3ec3bac539803005e9c42d056b2a mesa commit 67c498086d0858a94d53ebb6921cfda847250368 --- xorg-server/fb/fbfill.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) (limited to 'xorg-server/fb/fbfill.c') diff --git a/xorg-server/fb/fbfill.c b/xorg-server/fb/fbfill.c index de9d6b313..05d81ab77 100644 --- a/xorg-server/fb/fbfill.c +++ b/xorg-server/fb/fbfill.c @@ -26,6 +26,88 @@ #include "fb.h" +static void +fbTile(FbBits * dst, FbStride dstStride, int dstX, int width, int height, + FbBits * tile, FbStride tileStride, int tileWidth, int tileHeight, + int alu, FbBits pm, int bpp, int xRot, int yRot) +{ + int tileX, tileY; + int widthTmp; + int h, w; + int x, y; + + modulus(-yRot, tileHeight, tileY); + y = 0; + while (height) { + h = tileHeight - tileY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + modulus(dstX - xRot, tileWidth, tileX); + while (widthTmp) { + w = tileWidth - tileX; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBlt(tile + tileY * tileStride, + tileStride, + tileX, + dst + y * dstStride, + dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE); + x += w; + tileX = 0; + } + y += h; + tileY = 0; + } +} + +static void +fbStipple(FbBits * dst, FbStride dstStride, + int dstX, int dstBpp, + int width, int height, + FbStip * stip, FbStride stipStride, + int stipWidth, int stipHeight, + FbBits fgand, FbBits fgxor, + FbBits bgand, FbBits bgxor, + int xRot, int yRot) +{ + int stipX, stipY, sx; + int widthTmp; + int h, w; + int x, y; + + modulus(-yRot, stipHeight, stipY); + modulus(dstX / dstBpp - xRot, stipWidth, stipX); + y = 0; + while (height) { + h = stipHeight - stipY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + sx = stipX; + while (widthTmp) { + w = (stipWidth - sx) * dstBpp; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBltOne(stip + stipY * stipStride, + stipStride, + sx, + dst + y * dstStride, + dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor); + x += w; + sx = 0; + } + y += h; + stipY = 0; + } +} + void fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height) { @@ -97,7 +179,7 @@ fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height) fbStipple(dst + (y + dstYoff) * dstStride, dstStride, (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, stip, stipStride, stipWidth, stipHeight, - pPriv->evenStipple, fgand, fgxor, bgand, bgxor, + fgand, fgxor, bgand, bgxor, pGC->patOrg.x + pDrawable->x + dstXoff, pGC->patOrg.y + pDrawable->y - y); fbFinishAccess(&pStip->drawable); -- cgit v1.2.3