mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 16:55:56 +00:00
Xext: xvmc: use REPLY_*() macros for preparing / sending replies
Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
44
Xext/xvmc.c
44
Xext/xvmc.c
@@ -163,10 +163,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
|
||||
.num = num_surfaces,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&reply.num);
|
||||
}
|
||||
|
||||
REPLY_FIELD_CARD32(num);
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
@@ -259,12 +256,9 @@ ProcXvMCCreateContext(ClientPtr client)
|
||||
.flags_return = pContext->flags
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&reply.width_actual);
|
||||
swaps(&reply.height_actual);
|
||||
swapl(&reply.flags_return);
|
||||
}
|
||||
|
||||
REPLY_FIELD_CARD16(width_actual);
|
||||
REPLY_FIELD_CARD16(height_actual);
|
||||
REPLY_FIELD_CARD32(flags_return);
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
@@ -461,12 +455,10 @@ ProcXvMCCreateSubpicture(ClientPtr client)
|
||||
.component_order[3] = pSubpicture->component_order[3]
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&reply.width_actual);
|
||||
swaps(&reply.height_actual);
|
||||
swaps(&reply.num_palette_entries);
|
||||
swaps(&reply.entry_bytes);
|
||||
}
|
||||
REPLY_FIELD_CARD16(width_actual);
|
||||
REPLY_FIELD_CARD16(height_actual);
|
||||
REPLY_FIELD_CARD16(num_palette_entries);
|
||||
REPLY_FIELD_CARD16(entry_bytes);
|
||||
|
||||
pContext->refcnt++;
|
||||
|
||||
@@ -595,10 +587,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
|
||||
.num = num,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&reply.num);
|
||||
}
|
||||
|
||||
REPLY_FIELD_CARD32(num);
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
@@ -639,15 +628,12 @@ ProcXvMCGetDRInfo(ClientPtr client)
|
||||
* Read back to the client what she has put in the shared memory
|
||||
* segment she prepared for us.
|
||||
*/
|
||||
if (client->swapped) {
|
||||
swapl(&reply.major);
|
||||
swapl(&reply.minor);
|
||||
swapl(&reply.patchLevel);
|
||||
swapl(&reply.nameLen);
|
||||
swapl(&reply.busIDLen);
|
||||
swapl(&reply.isLocal);
|
||||
}
|
||||
|
||||
REPLY_FIELD_CARD32(major);
|
||||
REPLY_FIELD_CARD32(minor);
|
||||
REPLY_FIELD_CARD32(patchLevel);
|
||||
REPLY_FIELD_CARD32(nameLen);
|
||||
REPLY_FIELD_CARD32(busIDLen);
|
||||
REPLY_FIELD_CARD32(isLocal);
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user