mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
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:
committed by
Enrico Weigelt
parent
898251b461
commit
fd4f402d12
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user