render: consolidate byte-swapping in ProcRenderQueryPictIndexValues()

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:
Enrico Weigelt, metux IT consult
2025-09-08 13:20:03 +02:00
committed by Enrico Weigelt
parent 898251b461
commit fd4f402d12

View File

@@ -96,7 +96,6 @@ static int ProcRenderCreateConicalGradient(ClientPtr pClient);
static int ProcRenderDispatch(ClientPtr pClient);
static int SProcRenderQueryPictIndexValues(ClientPtr pClient);
static int SProcRenderCreatePicture(ClientPtr pClient);
static int SProcRenderChangePicture(ClientPtr pClient);
static int SProcRenderSetPictureClipRectangles(ClientPtr pClient);
@@ -167,7 +166,7 @@ ProcRenderQueryVersion,
int (*SProcRenderVector[RenderNumberRequests]) (ClientPtr) = {
ProcRenderQueryVersion,
ProcRenderQueryPictFormats,
SProcRenderQueryPictIndexValues,
ProcRenderQueryPictIndexValues,
_not_implemented, /* SProcRenderQueryDithers */
SProcRenderCreatePicture,
SProcRenderChangePicture,
@@ -486,6 +485,9 @@ ProcRenderQueryPictIndexValues(ClientPtr client)
REQUEST(xRenderQueryPictIndexValuesReq);
REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
if (client->swapped)
swapl(&stuff->format);
rc = dixLookupResourceByType((void **) &pFormat, stuff->format,
PictFormatType, client, DixReadAccess);
if (rc != Success)
@@ -1927,15 +1929,6 @@ ProcRenderDispatch(ClientPtr client)
return BadRequest;
}
static int _X_COLD
SProcRenderQueryPictIndexValues(ClientPtr client)
{
REQUEST(xRenderQueryPictIndexValuesReq);
REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
swapl(&stuff->format);
return ProcRenderQueryPictIndexValues(client);
}
static int _X_COLD
SProcRenderCreatePicture(ClientPtr client)
{