summaryrefslogtreecommitdiff
path: root/cfb/cfbtegblt.c
diff options
context:
space:
mode:
Diffstat (limited to 'cfb/cfbtegblt.c')
-rw-r--r--cfb/cfbtegblt.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/cfb/cfbtegblt.c b/cfb/cfbtegblt.c
index 0cba03575..7450c7829 100644
--- a/cfb/cfbtegblt.c
+++ b/cfb/cfbtegblt.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.7 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -109,7 +109,9 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
register int wtmp,xtemp,width;
CfbBits bgfill,fgfill,*ptemp,tmpDst1,tmpDst2,*pdtmp;
+#if PSZ != 24
int tmpx;
+#endif
xpos += pDrawable->x;
ypos += pDrawable->y;
@@ -177,23 +179,15 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
while (width > 0)
{
#if PSZ == 24
- tmpx = x & 3;
w = 1;
+ ptemp = (CfbBits *)(pglyph + ((xtemp *3)>> 2));
+ getstipplepixels24(ptemp,xtemp,0,&bgfill,&tmpDst1, xtemp);
+ getstipplepixels24(ptemp,xtemp,1,&fgfill,&tmpDst2, xtemp);
#else
tmpx = x & PIM;
w = min(width, PPW - tmpx);
w = min(w, (PGSZ - xtemp));
-#endif
-
-#if PSZ == 24
- ptemp = (CfbBits *)(pglyph + ((xtemp *3)>> 2));
-#else
ptemp = (CfbBits *)(pglyph + (xtemp >> MFB_PWSH));
-#endif
-#if PSZ == 24
- getstipplepixels24(ptemp,xtemp,0,&bgfill,&tmpDst1, xtemp);
- getstipplepixels24(ptemp,xtemp,1,&fgfill,&tmpDst2, xtemp);
-#else
getstipplepixels(ptemp,xtemp,w,0,&bgfill,&tmpDst1);
getstipplepixels(ptemp,xtemp,w,1,&fgfill,&tmpDst2);
#endif
@@ -202,7 +196,7 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
CfbBits tmpDst = tmpDst1 | tmpDst2;
#if PSZ == 24
CfbBits *pdsttmp = pdst + ((x*3) >> 2);
- putbits24(tmpDst,tmpx,w,pdsttmp,pGC->planemask,x);
+ putbits24(tmpDst,w,pdsttmp,pGC->planemask,x);
#else
CfbBits *pdsttmp = pdst + (x >> PWSH);
putbits(tmpDst,tmpx,w,pdsttmp,pGC->planemask);