From 7d8323a4ad3aa2719fedb69bc765ce33c9141b5e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 5 Sep 2019 17:58:55 +0200 Subject: nxagent: simplify nxagentRenderRealizeCursor also drop unused return code --- nx-X11/programs/Xserver/hw/nxagent/Render.c | 40 ++++++++++------------------- 1 file changed, 14 insertions(+), 26 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Render.c') 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) -- cgit v1.2.3