diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-09-05 17:58:55 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:15:25 +0200 |
commit | 7d8323a4ad3aa2719fedb69bc765ce33c9141b5e (patch) | |
tree | 5a57bc7be6e5bb7cd853222f2ec9feef473c49fd /nx-X11/programs/Xserver/hw/nxagent/Render.c | |
parent | 7ca51c52962c19cfc8a487943c1fd603563b8cf8 (diff) | |
download | nx-libs-7d8323a4ad3aa2719fedb69bc765ce33c9141b5e.tar.gz nx-libs-7d8323a4ad3aa2719fedb69bc765ce33c9141b5e.tar.bz2 nx-libs-7d8323a4ad3aa2719fedb69bc765ce33c9141b5e.zip |
nxagent: simplify nxagentRenderRealizeCursor
also drop unused return code
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Render.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Render.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 32639172b..b82db7f91 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -532,48 +532,36 @@ void nxagentCursorPostSaveRenderInfo(CursorPtr pCursor, ScreenPtr pScreen, nxagentCursorYOffset(pCursor, pScreen) = y; } -int nxagentRenderRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +void nxagentRenderRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { - int cid; - int x, y; - - PicturePtr pPicture; - - pPicture = nxagentCursorPicture(pCursor, pScreen); + PicturePtr pPicture = nxagentCursorPicture(pCursor, pScreen); pPicture -> refcnt++; - x = nxagentCursorXOffset(pCursor, pScreen); - y = nxagentCursorYOffset(pCursor, pScreen); - - /* - * Set the lossless trap so that the image functions - * will not try to encode the image using a lossy - * compression. Drawables should have a quality flag, - * telling if they were originally encoded with a - * lossy algorithm. This would allow us to skip the - * synchronization if the cursor was already encoded - * with the best quality. - */ + int x = nxagentCursorXOffset(pCursor, pScreen); + int y = nxagentCursorYOffset(pCursor, pScreen); #ifdef TEST - fprintf(stderr, "nxagentRenderRealizeCursor: Forcing the synchronization " - "of the cursor.\n"); + fprintf(stderr, "%s: Forcing the synchronization of the cursor.\n", __func__); #endif nxagentMarkCorruptedRegion(pPicture -> pDrawable, NULL); + /* + * Set the lossless trap so that the image functions will not try to + * encode the image using a lossy compression. Drawables should have + * a quality flag, telling if they were originally encoded with a + * lossy algorithm. This would allow us to skip the synchronization + * if the cursor was already encoded with the best quality. + */ + nxagentLosslessTrap = 1; nxagentSynchronizeDrawable(pPicture -> pDrawable, DO_WAIT, NEVER_BREAK, NULL); nxagentLosslessTrap = 0; - cid = XRenderCreateCursor(nxagentDisplay, nxagentPicture(pPicture), x, y); - - nxagentCursor(pCursor, pScreen) = cid; - - return 1; + nxagentCursor(pCursor, pScreen) = XRenderCreateCursor(nxagentDisplay, nxagentPicture(pPicture), x, y); } int nxagentCreatePicture(PicturePtr pPicture, Mask mask) |