diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 16:00:44 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 16:00:44 +0200 |
commit | e91d08cb8d1fd529e33f9ef9924b3a7cdfea2df0 (patch) | |
tree | a8fbc3bfb442ef8222367b9a5b2285c9e6408fda /nx-X11/programs/Xserver/hw/nxagent/Render.c | |
parent | 424c0e8ee3986b886bf2d7617897577a6b84aaed (diff) | |
parent | c69d2ad0fc5f69163c4babc7a356a783aa7ae411 (diff) | |
download | nx-libs-e91d08cb8d1fd529e33f9ef9924b3a7cdfea2df0.tar.gz nx-libs-e91d08cb8d1fd529e33f9ef9924b3a7cdfea2df0.tar.bz2 nx-libs-e91d08cb8d1fd529e33f9ef9924b3a7cdfea2df0.zip |
Merge branch 'uli42-pr/various4' into 3.6.x
Attributes GH PR #896: https://github.com/ArcticaProject/nx-libs/pull/896
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) { |