mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xv: inline SWriteQueryEncodingsReply()
Instead of complex macro machinery, just move the conditional swapping directly into ProcXvQueryEncodings(). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
ef8cf84e6d
commit
3bd75a2fd6
@@ -54,18 +54,6 @@ SOFTWARE.
|
||||
unsigned long XvXRTPort;
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int
|
||||
SWriteQueryEncodingsReply(ClientPtr client, xvQueryEncodingsReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
swaps(&rep->num_encodings);
|
||||
|
||||
WriteToClient(client, sz_xvQueryEncodingsReply, rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
SWriteAdaptorInfo(ClientPtr client, xvAdaptorInfo * pAdaptor)
|
||||
{
|
||||
@@ -215,10 +203,6 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
|
||||
return Success;
|
||||
}
|
||||
|
||||
#define _WriteQueryEncodingsReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvQueryEncodingsReply, _d)
|
||||
|
||||
#define _WriteAdaptorInfo(_c,_d) \
|
||||
if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvAdaptorInfo, _d)
|
||||
@@ -409,7 +393,13 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||
.length = bytes_to_int32(totalSize),
|
||||
};
|
||||
|
||||
_WriteQueryEncodingsReply(client, &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.num_encodings);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
|
||||
ne = pPort->pAdaptor->nEncodings;
|
||||
pe = pPort->pAdaptor->pEncodings;
|
||||
|
||||
Reference in New Issue
Block a user