aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-09-05 17:58:55 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:15:25 +0200
commit7d8323a4ad3aa2719fedb69bc765ce33c9141b5e (patch)
tree5a57bc7be6e5bb7cd853222f2ec9feef473c49fd /nx-X11/programs/Xserver/hw/nxagent
parent7ca51c52962c19cfc8a487943c1fd603563b8cf8 (diff)
downloadnx-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')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrender.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c40
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.h2
3 files changed, 16 insertions, 28 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
index 5aa7606e8..105d7048b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
@@ -90,7 +90,7 @@ void miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
extern int nxagentCursorSaveRenderInfo(ScreenPtr, CursorPtr);
extern void nxagentCursorPostSaveRenderInfo(CursorPtr, ScreenPtr, PicturePtr, int, int);
-extern int nxagentRenderRealizeCursor(ScreenPtr, CursorPtr);
+extern void nxagentRenderRealizeCursor(ScreenPtr, CursorPtr);
extern int nxagentCreatePicture(PicturePtr, Mask);
extern void nxagentChangePicture(PicturePtr, Mask);
extern int nxagentChangePictureClip(PicturePtr, int, int, xRectangle *, int, int);
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)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.h b/nx-X11/programs/Xserver/hw/nxagent/Render.h
index 1c56ec16b..70fefe42d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.h
@@ -104,7 +104,7 @@ while (0)
void nxagentRenderExtensionInit(void);
Bool nxagentPictureInit(ScreenPtr, PictFormatPtr, int);
-int nxagentRenderRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
+void nxagentRenderRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
int nglyphs, CARD8 *images, int sizeImages);