mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
render: consolidate byte-swapping in ProcRenderFreePicture()
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
07ac2c2c99
commit
6731d7643a
@@ -97,7 +97,6 @@ static int ProcRenderCreateConicalGradient(ClientPtr pClient);
|
||||
|
||||
static int ProcRenderDispatch(ClientPtr pClient);
|
||||
|
||||
static int SProcRenderFreePicture(ClientPtr pClient);
|
||||
static int SProcRenderTrapezoids(ClientPtr pClient);
|
||||
static int SProcRenderTriangles(ClientPtr pClient);
|
||||
static int SProcRenderTriStrip(ClientPtr pClient);
|
||||
@@ -160,7 +159,7 @@ int (*SProcRenderVector[RenderNumberRequests]) (ClientPtr) = {
|
||||
ProcRenderCreatePicture,
|
||||
ProcRenderChangePicture,
|
||||
ProcRenderSetPictureClipRectangles,
|
||||
SProcRenderFreePicture,
|
||||
ProcRenderFreePicture,
|
||||
ProcRenderComposite,
|
||||
_not_implemented, /* SProcRenderScale */
|
||||
SProcRenderTrapezoids,
|
||||
@@ -589,8 +588,6 @@ SingleRenderFreePicture(ClientPtr client)
|
||||
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xRenderFreePictureReq);
|
||||
|
||||
VERIFY_PICTURE(pPicture, stuff->picture, client, DixDestroyAccess);
|
||||
FreeResource(stuff->picture, X11_RESTYPE_NONE);
|
||||
return Success;
|
||||
@@ -1968,15 +1965,6 @@ ProcRenderDispatch(ClientPtr client)
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcRenderFreePicture(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
REQUEST_SIZE_MATCH(xRenderFreePictureReq);
|
||||
swapl(&stuff->picture);
|
||||
return ProcRenderFreePicture(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcRenderTrapezoids(ClientPtr client)
|
||||
{
|
||||
@@ -2441,8 +2429,6 @@ PanoramiXRenderFreePicture(ClientPtr client)
|
||||
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xRenderFreePictureReq);
|
||||
|
||||
client->errorValue = stuff->picture;
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess);
|
||||
@@ -3059,6 +3045,12 @@ ProcRenderSetPictureClipRectangles(ClientPtr client)
|
||||
static int
|
||||
ProcRenderFreePicture(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
REQUEST_SIZE_MATCH(xRenderFreePictureReq);
|
||||
|
||||
if (client->swapped)
|
||||
swapl(&stuff->picture);
|
||||
|
||||
#ifdef XINERAMA
|
||||
return (usePanoramiX ? PanoramiXRenderFreePicture(client)
|
||||
: SingleRenderFreePicture(client));
|
||||
|
||||
Reference in New Issue
Block a user