diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Render.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Render.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 6113a419a..f38319858 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -186,6 +186,7 @@ Bool nxagentDisconnectAllPicture(void); #define ROUNDUP(nbits, pad) ((((nbits) + ((pad)-1)) / (pad)) * ((pad)>>3)) +/* Clean the padding bytes of data section of request.*/ void nxagentCleanGlyphs(xGlyphInfo *gi, int nglyphs, @@ -360,19 +361,15 @@ nxagentCleanGlyphs(xGlyphInfo *gi, if (bytesToClean > 0) { - while (height > 0) + for (; height > 0; height--) { - int count = bytesToClean; - - while (count > 0) + for (int i = bytesToClean; i > 0; i--) { - *(images + (bytesPerLine - count)) = 0; + *(images + (bytesPerLine - i)) = 0; #ifdef DEBUG fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n"); #endif - - count--; } #ifdef DUMP @@ -385,8 +382,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi, #endif images += bytesPerLine; - - height--; } } @@ -537,11 +532,11 @@ void nxagentRenderRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) * if the cursor was already encoded with the best quality. */ - nxagentLosslessTrap = 1; + nxagentLosslessTrap = True; nxagentSynchronizeDrawable(pPicture -> pDrawable, DO_WAIT, NEVER_BREAK, NULL); - nxagentLosslessTrap = 0; + nxagentLosslessTrap = False; nxagentCursor(pCursor, pScreen) = XRenderCreateCursor(nxagentDisplay, nxagentPicture(pPicture), x, y); } @@ -1157,7 +1152,7 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion); - nxagentFreeRegion(pDst -> pDrawable, pDstRegion); + nxagentFreeRegion(pDstRegion); return; } @@ -1326,12 +1321,12 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, (void *) pDst -> pDrawable); #endif - nxagentFreeRegion(pDst -> pDrawable, pRegion); + nxagentFreeRegion(pRegion); return; } - nxagentFreeRegion(pDst -> pDrawable, pRegion); + nxagentFreeRegion(pRegion); } /* @@ -1817,7 +1812,7 @@ FIXME: Is this useful or just a waste of bandwidth? nxagentMarkCorruptedRegion(pDst -> pDrawable, pDstRegion); - nxagentFreeRegion(pDst -> pDrawable, pDstRegion); + nxagentFreeRegion(pDstRegion); if (pDst -> pDrawable -> type == DRAWABLE_PIXMAP) { |