mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
render: consolidate byte-swapping in ProcRenderCreateCursor()
No need for extra functions and call tables for the few trivial lines. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
24885d9019
commit
70428787cd
@@ -111,7 +111,6 @@ static int SProcRenderAddGlyphs(ClientPtr pClient);
|
||||
static int SProcRenderFreeGlyphs(ClientPtr pClient);
|
||||
static int SProcRenderCompositeGlyphs(ClientPtr pClient);
|
||||
static int SProcRenderFillRectangles(ClientPtr pClient);
|
||||
static int SProcRenderCreateCursor(ClientPtr pClient);
|
||||
static int SProcRenderSetPictureTransform(ClientPtr pClient);
|
||||
static int SProcRenderQueryFilters(ClientPtr pClient);
|
||||
static int SProcRenderSetPictureFilter(ClientPtr pClient);
|
||||
@@ -190,7 +189,7 @@ int (*SProcRenderVector[RenderNumberRequests]) (ClientPtr) = {
|
||||
SProcRenderCompositeGlyphs,
|
||||
SProcRenderCompositeGlyphs,
|
||||
SProcRenderFillRectangles,
|
||||
SProcRenderCreateCursor,
|
||||
ProcRenderCreateCursor,
|
||||
SProcRenderSetPictureTransform,
|
||||
SProcRenderQueryFilters,
|
||||
SProcRenderSetPictureFilter,
|
||||
@@ -1387,6 +1386,15 @@ static int
|
||||
ProcRenderCreateCursor(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateCursorReq);
|
||||
REQUEST_SIZE_MATCH(xRenderCreateCursorReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&stuff->cid);
|
||||
swapl(&stuff->src);
|
||||
swaps(&stuff->x);
|
||||
swaps(&stuff->y);
|
||||
}
|
||||
|
||||
PicturePtr pSrc;
|
||||
ScreenPtr pScreen;
|
||||
unsigned short width, height;
|
||||
@@ -1401,7 +1409,6 @@ ProcRenderCreateCursor(ClientPtr client)
|
||||
CARD32 twocolor[3];
|
||||
int rc, ncolor;
|
||||
|
||||
REQUEST_SIZE_MATCH(xRenderCreateCursorReq);
|
||||
LEGAL_NEW_RESOURCE(stuff->cid, client);
|
||||
|
||||
VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess);
|
||||
@@ -2213,19 +2220,6 @@ SProcRenderFillRectangles(ClientPtr client)
|
||||
return ProcRenderFillRectangles(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcRenderCreateCursor(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateCursorReq);
|
||||
REQUEST_SIZE_MATCH(xRenderCreateCursorReq);
|
||||
|
||||
swapl(&stuff->cid);
|
||||
swapl(&stuff->src);
|
||||
swaps(&stuff->x);
|
||||
swaps(&stuff->y);
|
||||
return ProcRenderCreateCursor(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcRenderSetPictureTransform(ClientPtr client)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user