Commit 7d8323a4 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: simplify nxagentRenderRealizeCursor

also drop unused return code
parent 7ca51c52
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment