render: drop swapping request length fields

The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-06 14:41:17 +02:00 committed by Marge Bot
parent 5bcbacce6c
commit 00ab4ff813

View File

@ -2004,7 +2004,6 @@ SProcRenderQueryVersion(ClientPtr client)
{ {
REQUEST(xRenderQueryVersionReq); REQUEST(xRenderQueryVersionReq);
REQUEST_SIZE_MATCH(xRenderQueryVersionReq); REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
swaps(&stuff->length);
swapl(&stuff->majorVersion); swapl(&stuff->majorVersion);
swapl(&stuff->minorVersion); swapl(&stuff->minorVersion);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2015,7 +2014,6 @@ SProcRenderQueryPictFormats(ClientPtr client)
{ {
REQUEST(xRenderQueryPictFormatsReq); REQUEST(xRenderQueryPictFormatsReq);
REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq); REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
swaps(&stuff->length);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
@ -2024,7 +2022,6 @@ SProcRenderQueryPictIndexValues(ClientPtr client)
{ {
REQUEST(xRenderQueryPictIndexValuesReq); REQUEST(xRenderQueryPictIndexValuesReq);
REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq); REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
swaps(&stuff->length);
swapl(&stuff->format); swapl(&stuff->format);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
@ -2040,7 +2037,6 @@ SProcRenderCreatePicture(ClientPtr client)
{ {
REQUEST(xRenderCreatePictureReq); REQUEST(xRenderCreatePictureReq);
REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
swaps(&stuff->length);
swapl(&stuff->pid); swapl(&stuff->pid);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->format); swapl(&stuff->format);
@ -2054,7 +2050,6 @@ SProcRenderChangePicture(ClientPtr client)
{ {
REQUEST(xRenderChangePictureReq); REQUEST(xRenderChangePictureReq);
REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
swapl(&stuff->mask); swapl(&stuff->mask);
SwapRestL(stuff); SwapRestL(stuff);
@ -2066,7 +2061,6 @@ SProcRenderSetPictureClipRectangles(ClientPtr client)
{ {
REQUEST(xRenderSetPictureClipRectanglesReq); REQUEST(xRenderSetPictureClipRectanglesReq);
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
swaps(&stuff->xOrigin); swaps(&stuff->xOrigin);
swaps(&stuff->yOrigin); swaps(&stuff->yOrigin);
@ -2079,7 +2073,6 @@ SProcRenderFreePicture(ClientPtr client)
{ {
REQUEST(xRenderFreePictureReq); REQUEST(xRenderFreePictureReq);
REQUEST_SIZE_MATCH(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
@ -2089,7 +2082,6 @@ SProcRenderComposite(ClientPtr client)
{ {
REQUEST(xRenderCompositeReq); REQUEST(xRenderCompositeReq);
REQUEST_SIZE_MATCH(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq);
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->mask); swapl(&stuff->mask);
swapl(&stuff->dst); swapl(&stuff->dst);
@ -2116,7 +2108,6 @@ SProcRenderTrapezoids(ClientPtr client)
REQUEST(xRenderTrapezoidsReq); REQUEST(xRenderTrapezoidsReq);
REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->dst); swapl(&stuff->dst);
swapl(&stuff->maskFormat); swapl(&stuff->maskFormat);
@ -2132,7 +2123,6 @@ SProcRenderTriangles(ClientPtr client)
REQUEST(xRenderTrianglesReq); REQUEST(xRenderTrianglesReq);
REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->dst); swapl(&stuff->dst);
swapl(&stuff->maskFormat); swapl(&stuff->maskFormat);
@ -2148,7 +2138,6 @@ SProcRenderTriStrip(ClientPtr client)
REQUEST(xRenderTriStripReq); REQUEST(xRenderTriStripReq);
REQUEST_AT_LEAST_SIZE(xRenderTriStripReq); REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->dst); swapl(&stuff->dst);
swapl(&stuff->maskFormat); swapl(&stuff->maskFormat);
@ -2164,7 +2153,6 @@ SProcRenderTriFan(ClientPtr client)
REQUEST(xRenderTriFanReq); REQUEST(xRenderTriFanReq);
REQUEST_AT_LEAST_SIZE(xRenderTriFanReq); REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->dst); swapl(&stuff->dst);
swapl(&stuff->maskFormat); swapl(&stuff->maskFormat);
@ -2197,7 +2185,6 @@ SProcRenderCreateGlyphSet(ClientPtr client)
{ {
REQUEST(xRenderCreateGlyphSetReq); REQUEST(xRenderCreateGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->gsid); swapl(&stuff->gsid);
swapl(&stuff->format); swapl(&stuff->format);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2208,7 +2195,6 @@ SProcRenderReferenceGlyphSet(ClientPtr client)
{ {
REQUEST(xRenderReferenceGlyphSetReq); REQUEST(xRenderReferenceGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->gsid); swapl(&stuff->gsid);
swapl(&stuff->existing); swapl(&stuff->existing);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2219,7 +2205,6 @@ SProcRenderFreeGlyphSet(ClientPtr client)
{ {
REQUEST(xRenderFreeGlyphSetReq); REQUEST(xRenderFreeGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->glyphset); swapl(&stuff->glyphset);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
@ -2234,7 +2219,6 @@ SProcRenderAddGlyphs(ClientPtr client)
REQUEST(xRenderAddGlyphsReq); REQUEST(xRenderAddGlyphsReq);
REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
swaps(&stuff->length);
swapl(&stuff->glyphset); swapl(&stuff->glyphset);
swapl(&stuff->nglyphs); swapl(&stuff->nglyphs);
if (stuff->nglyphs & 0xe0000000) if (stuff->nglyphs & 0xe0000000)
@ -2269,7 +2253,6 @@ SProcRenderFreeGlyphs(ClientPtr client)
{ {
REQUEST(xRenderFreeGlyphsReq); REQUEST(xRenderFreeGlyphsReq);
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
swaps(&stuff->length);
swapl(&stuff->glyphset); swapl(&stuff->glyphset);
SwapRestL(stuff); SwapRestL(stuff);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2300,7 +2283,6 @@ SProcRenderCompositeGlyphs(ClientPtr client)
break; break;
} }
swaps(&stuff->length);
swapl(&stuff->src); swapl(&stuff->src);
swapl(&stuff->dst); swapl(&stuff->dst);
swapl(&stuff->maskFormat); swapl(&stuff->maskFormat);
@ -2362,7 +2344,6 @@ SProcRenderFillRectangles(ClientPtr client)
REQUEST(xRenderFillRectanglesReq); REQUEST(xRenderFillRectanglesReq);
REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq);
swaps(&stuff->length);
swapl(&stuff->dst); swapl(&stuff->dst);
swaps(&stuff->color.red); swaps(&stuff->color.red);
swaps(&stuff->color.green); swaps(&stuff->color.green);
@ -2378,7 +2359,6 @@ SProcRenderCreateCursor(ClientPtr client)
REQUEST(xRenderCreateCursorReq); REQUEST(xRenderCreateCursorReq);
REQUEST_SIZE_MATCH(xRenderCreateCursorReq); REQUEST_SIZE_MATCH(xRenderCreateCursorReq);
swaps(&stuff->length);
swapl(&stuff->cid); swapl(&stuff->cid);
swapl(&stuff->src); swapl(&stuff->src);
swaps(&stuff->x); swaps(&stuff->x);
@ -2392,7 +2372,6 @@ SProcRenderSetPictureTransform(ClientPtr client)
REQUEST(xRenderSetPictureTransformReq); REQUEST(xRenderSetPictureTransformReq);
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
swapl(&stuff->transform.matrix11); swapl(&stuff->transform.matrix11);
swapl(&stuff->transform.matrix12); swapl(&stuff->transform.matrix12);
@ -2412,7 +2391,6 @@ SProcRenderQueryFilters(ClientPtr client)
REQUEST(xRenderQueryFiltersReq); REQUEST(xRenderQueryFiltersReq);
REQUEST_SIZE_MATCH(xRenderQueryFiltersReq); REQUEST_SIZE_MATCH(xRenderQueryFiltersReq);
swaps(&stuff->length);
swapl(&stuff->drawable); swapl(&stuff->drawable);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
@ -2423,7 +2401,6 @@ SProcRenderSetPictureFilter(ClientPtr client)
REQUEST(xRenderSetPictureFilterReq); REQUEST(xRenderSetPictureFilterReq);
REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
swaps(&stuff->nbytes); swaps(&stuff->nbytes);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2435,7 +2412,6 @@ SProcRenderCreateAnimCursor(ClientPtr client)
REQUEST(xRenderCreateAnimCursorReq); REQUEST(xRenderCreateAnimCursorReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq); REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq);
swaps(&stuff->length);
swapl(&stuff->cid); swapl(&stuff->cid);
SwapRestL(stuff); SwapRestL(stuff);
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
@ -2447,7 +2423,6 @@ SProcRenderAddTraps(ClientPtr client)
REQUEST(xRenderAddTrapsReq); REQUEST(xRenderAddTrapsReq);
REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq);
swaps(&stuff->length);
swapl(&stuff->picture); swapl(&stuff->picture);
swaps(&stuff->xOff); swaps(&stuff->xOff);
swaps(&stuff->yOff); swaps(&stuff->yOff);
@ -2461,7 +2436,6 @@ SProcRenderCreateSolidFill(ClientPtr client)
REQUEST(xRenderCreateSolidFillReq); REQUEST(xRenderCreateSolidFillReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
swaps(&stuff->length);
swapl(&stuff->pid); swapl(&stuff->pid);
swaps(&stuff->color.alpha); swaps(&stuff->color.alpha);
swaps(&stuff->color.red); swaps(&stuff->color.red);
@ -2497,7 +2471,6 @@ SProcRenderCreateLinearGradient(ClientPtr client)
REQUEST(xRenderCreateLinearGradientReq); REQUEST(xRenderCreateLinearGradientReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
swaps(&stuff->length);
swapl(&stuff->pid); swapl(&stuff->pid);
swapl(&stuff->p1.x); swapl(&stuff->p1.x);
swapl(&stuff->p1.y); swapl(&stuff->p1.y);
@ -2524,7 +2497,6 @@ SProcRenderCreateRadialGradient(ClientPtr client)
REQUEST(xRenderCreateRadialGradientReq); REQUEST(xRenderCreateRadialGradientReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
swaps(&stuff->length);
swapl(&stuff->pid); swapl(&stuff->pid);
swapl(&stuff->inner.x); swapl(&stuff->inner.x);
swapl(&stuff->inner.y); swapl(&stuff->inner.y);
@ -2553,7 +2525,6 @@ SProcRenderCreateConicalGradient(ClientPtr client)
REQUEST(xRenderCreateConicalGradientReq); REQUEST(xRenderCreateConicalGradientReq);
REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
swaps(&stuff->length);
swapl(&stuff->pid); swapl(&stuff->pid);
swapl(&stuff->center.x); swapl(&stuff->center.x);
swapl(&stuff->center.y); swapl(&stuff->center.y);