diff options
author | alanh <alanh> | 2000-07-10 21:17:26 +0000 |
---|---|---|
committer | alanh <alanh> | 2000-07-10 21:17:26 +0000 |
commit | 30722f5171428576252260bfe13e2dcd8f622a4d (patch) | |
tree | da831e272145819ef138fd4ca1183f2b782ac2d1 /xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c | |
parent | 55378d1c9953642fb1b327237d51287d4d8beefb (diff) |
Import of XFree86 4.0.1X_4_0_1
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c | 87 |
1 files changed, 1 insertions, 86 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c b/xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c index 7ff9dfdf7..b0bb33ff3 100644 --- a/xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c +++ b/xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c,v 1.18 2000/02/10 23:21:38 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c,v 1.19 2000/04/01 22:42:04 mvojkovi Exp $ */ #include "misc.h" #include "xf86.h" @@ -515,88 +515,3 @@ XAAPutImage( XAAFallbackOps.PutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); } - - -void -XAAReadPixmap ( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned char *dst, - int dstwidth, /* bytes */ - int bpp, int depth -){ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - int ReadDwords, WriteBytes, Surplus, Bpp = bpp >> 3; - unsigned char *tmp; - Bool PlusOne = FALSE; - union { - CARD32 IntData; - unsigned char CharData[4]; - } extra; - - WriteBytes = w * Bpp; - ReadDwords = (WriteBytes + 3) >> 2; - - if((infoRec->ImageReadFlags & CPU_TRANSFER_PAD_QWORD) && - ((ReadDwords * h) & 0x01)) { - PlusOne = TRUE; - } - - - (*infoRec->SetupForImageRead)(pScrn, bpp, depth); - (*infoRec->SubsequentImageReadRect)(pScrn, x, y, w, h); - - if(ReadDwords > infoRec->ImageWriteRange) { - if((Surplus = (ReadDwords << 2) - WriteBytes)) { - ReadDwords--; - while(h--) { - if(ReadDwords) - XAAMoveDWORDS_FixedSrc((CARD32*)dst, - (CARD32*)infoRec->ImageReadBase, ReadDwords); - extra.IntData = *((CARD32*)infoRec->ImageReadBase); - tmp = dst + (ReadDwords << 2); - switch(Surplus) { - case 3: tmp[2] = extra.CharData[2]; - case 2: tmp[1] = extra.CharData[1]; - case 1: tmp[0] = extra.CharData[0]; - } - dst += dstwidth; - } - } else { - while(h--) { - XAAMoveDWORDS_FixedSrc((CARD32*)dst, - (CARD32*)infoRec->ImageReadBase, ReadDwords); - dst += dstwidth; - } - } - } else { - if((Surplus = (ReadDwords << 2) - WriteBytes)) { - ReadDwords--; - while(h--) { - if(ReadDwords) - XAAMoveDWORDS((CARD32*)dst, - (CARD32*)infoRec->ImageReadBase, ReadDwords); - extra.IntData = - *((CARD32*)(infoRec->ImageReadBase) + ReadDwords); - tmp = dst + (ReadDwords << 2); - switch(Surplus) { - case 3: tmp[2] = extra.CharData[2]; - case 2: tmp[1] = extra.CharData[1]; - case 1: tmp[0] = extra.CharData[0]; - } - dst += dstwidth; - } - } else { - while(h--) { - XAAMoveDWORDS((CARD32*)dst, - (CARD32*)infoRec->ImageReadBase, ReadDwords); - dst += dstwidth; - } - } - } - - if(PlusOne) - extra.IntData = *((CARD32*)infoRec->ImageReadBase); - - SET_SYNC_FLAG(infoRec); -} |