dix: inline SProcAllocColor()

Now that we have untwisted Xinerama side, it's trivial to inline
the few lines for byte-swapping into the actual handlers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-10-01 14:44:17 +02:00
committed by Enrico Weigelt
parent e352fdecfe
commit 85fae9bffb
5 changed files with 15 additions and 15 deletions

View File

@@ -2710,6 +2710,13 @@ ProcAllocColor(ClientPtr client)
REQUEST(xAllocColorReq);
REQUEST_SIZE_MATCH(xAllocColorReq);
if (client->swapped) {
swapl(&stuff->cmap);
swaps(&stuff->red);
swaps(&stuff->green);
swaps(&stuff->blue);
}
xAllocColorReply rep = {
.red = stuff->red,
.green = stuff->green,

View File

@@ -584,18 +584,6 @@ SProcCopyColormapAndFree(ClientPtr client)
return ((*ProcVector[X_CopyColormapAndFree]) (client));
}
int _X_COLD
SProcAllocColor(ClientPtr client)
{
REQUEST(xAllocColorReq);
REQUEST_SIZE_MATCH(xAllocColorReq);
swapl(&stuff->cmap);
swaps(&stuff->red);
swaps(&stuff->green);
swaps(&stuff->blue);
return ((*ProcVector[X_AllocColor]) (client));
}
int _X_COLD
SProcAllocNamedColor(ClientPtr client)
{

View File

@@ -30,7 +30,6 @@ extern void SwapColorItem(xColorItem * /* pItem */ );
extern void SwapConnClientPrefix(xConnClientPrefix * /* pCCP */ );
int SProcAllocColor(ClientPtr client);
int SProcAllocColorCells(ClientPtr client);
int SProcAllocColorPlanes(ClientPtr client);
int SProcAllocNamedColor(ClientPtr client);

View File

@@ -416,7 +416,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = {
ProcInstallColormap,
ProcUninstallColormap,
ProcListInstalledColormaps,
SProcAllocColor,
ProcAllocColor,
SProcAllocNamedColor, /* 85 */
SProcAllocColorCells,
SProcAllocColorPlanes,