mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
render: canonical walkScreenIdx variable on screen list iterations
When iterating screen lists, consistently use the same variable name `walkScreenIdx` for holding current screen index everywhere. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
31e7112138
commit
638822b19e
@@ -305,8 +305,8 @@ AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor,
|
||||
int rc = BadAlloc, i;
|
||||
AnimCurPtr ac;
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (!GetAnimCurScreen(walkScreen))
|
||||
return BadImplementation;
|
||||
}
|
||||
|
||||
@@ -337,13 +337,11 @@ SetPictureFilter(PicturePtr pPicture, char *name, int len, xFixed * params,
|
||||
return BadName;
|
||||
|
||||
if (pPicture->pDrawable == NULL) {
|
||||
int s;
|
||||
|
||||
/* For source pictures, the picture isn't tied to a screen. So, ensure
|
||||
* that all screens can handle a filter we set for the picture.
|
||||
*/
|
||||
for (s = 1; s < screenInfo.numScreens; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 1; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
PictFilterPtr pScreenFilter;
|
||||
|
||||
pScreenFilter = PictureFindFilter(walkScreen, name, len);
|
||||
|
||||
@@ -232,10 +232,8 @@ CheckDuplicates(GlyphHashPtr hash, char *where)
|
||||
static void
|
||||
FreeGlyphPicture(GlyphPtr glyph)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
|
||||
if (GetGlyphPicture(glyph, walkScreen))
|
||||
FreePicture((void *) GetGlyphPicture(glyph, walkScreen), 0);
|
||||
@@ -344,7 +342,6 @@ GlyphPtr
|
||||
AllocateGlyph(xGlyphInfo * gi, int fdepth)
|
||||
{
|
||||
int size;
|
||||
int i;
|
||||
int head_size;
|
||||
|
||||
head_size = sizeof(GlyphRec) + screenInfo.numScreens * sizeof(PicturePtr);
|
||||
@@ -357,14 +354,17 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth)
|
||||
glyph->info = *gi;
|
||||
dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH);
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[i];
|
||||
unsigned int i;
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
SetGlyphPicture(glyph, walkScreen, NULL);
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen);
|
||||
|
||||
if (ps) {
|
||||
if (!(ps->RealizeGlyph(walkScreen, glyph)))
|
||||
if (!(ps->RealizeGlyph(walkScreen, glyph))) {
|
||||
i = walkScreenIdx;
|
||||
goto bail;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -450,10 +450,8 @@ PictureInitIndexedFormats(ScreenPtr pScreen)
|
||||
Bool
|
||||
PictureFinishInit(void)
|
||||
{
|
||||
int s;
|
||||
|
||||
for (s = 0; s < screenInfo.numScreens; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (!PictureInitIndexedFormats(walkScreen))
|
||||
return FALSE;
|
||||
(void) AnimCurInit(walkScreen);
|
||||
|
||||
194
render/render.c
194
render/render.c
@@ -313,7 +313,6 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
int ndepth;
|
||||
int nvisual;
|
||||
int rlength;
|
||||
int s;
|
||||
int numScreens;
|
||||
int numSubpixel;
|
||||
|
||||
@@ -330,8 +329,8 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
numScreens = screenInfo.numScreens;
|
||||
#endif /* XINERAMA */
|
||||
ndepth = nformat = nvisual = 0;
|
||||
for (s = 0; s < numScreens; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
for (d = 0; d < walkScreen->numDepths; d++) {
|
||||
pDepth = walkScreen->allowedDepths + d;
|
||||
++ndepth;
|
||||
@@ -372,8 +371,8 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
|
||||
pictForm = (xPictFormInfo *) (reply + 1);
|
||||
|
||||
for (s = 0; s < numScreens; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen);
|
||||
if (ps) {
|
||||
for (nformat = 0, pFormat = ps->formats;
|
||||
@@ -412,8 +411,8 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
}
|
||||
|
||||
pictScreen = (xPictScreen *) pictForm;
|
||||
for (s = 0; s < numScreens; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
pictDepth = (xPictDepth *) (pictScreen + 1);
|
||||
ndepth = 0;
|
||||
for (d = 0; d < walkScreen->numDepths; d++) {
|
||||
@@ -458,8 +457,8 @@ ProcRenderQueryPictFormats(ClientPtr client)
|
||||
}
|
||||
pictSubpixel = (CARD32 *) pictScreen;
|
||||
|
||||
for (s = 0; s < numSubpixel; s++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[s];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < numSubpixel; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen);
|
||||
if (ps)
|
||||
*pictSubpixel = ps->subpixel;
|
||||
@@ -980,7 +979,7 @@ ProcRenderAddGlyphs(ClientPtr client)
|
||||
CARD8 *bits;
|
||||
unsigned int size;
|
||||
int err;
|
||||
int i, screen;
|
||||
int i;
|
||||
PicturePtr pSrc = NULL, pDst = NULL;
|
||||
PixmapPtr pSrcPix = NULL, pDstPix = NULL;
|
||||
CARD32 component_alpha;
|
||||
@@ -1064,8 +1063,8 @@ ProcRenderAddGlyphs(ClientPtr client)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
for (screen = 0; screen < screenInfo.numScreens; screen++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[screen];
|
||||
for (unsigned int walkScreenIdx = 0; walkScreenIdx < screenInfo.numScreens; walkScreenIdx++) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
int width = gi[i].width;
|
||||
int height = gi[i].height;
|
||||
int depth = glyphSet->format->depth;
|
||||
@@ -2551,7 +2550,7 @@ PanoramiXRenderCreatePicture(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreatePictureReq);
|
||||
PanoramiXRes *refDraw, *newPict;
|
||||
int result, j;
|
||||
int result;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
|
||||
result = dixLookupResourceByClass((void **) &refDraw, stuff->drawable,
|
||||
@@ -2570,9 +2569,10 @@ PanoramiXRenderCreatePicture(ClientPtr client)
|
||||
else
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
stuff->drawable = refDraw->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->pid = newPict->info[walkScreenIdx].id;
|
||||
stuff->drawable = refDraw->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client);
|
||||
if (result != Success)
|
||||
break;
|
||||
@@ -2590,7 +2590,7 @@ static int
|
||||
PanoramiXRenderChangePicture(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *pict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderChangePictureReq);
|
||||
|
||||
@@ -2598,8 +2598,9 @@ PanoramiXRenderChangePicture(ClientPtr client)
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->picture = pict->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client);
|
||||
if (result != Success)
|
||||
break;
|
||||
@@ -2612,15 +2613,16 @@ static int
|
||||
PanoramiXRenderSetPictureClipRectangles(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureClipRectanglesReq);
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
PanoramiXRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->picture = pict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles])
|
||||
(client);
|
||||
@@ -2635,15 +2637,16 @@ static int
|
||||
PanoramiXRenderSetPictureTransform(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureTransformReq);
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
PanoramiXRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->picture = pict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client);
|
||||
if (result != Success)
|
||||
@@ -2657,15 +2660,16 @@ static int
|
||||
PanoramiXRenderSetPictureFilter(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureFilterReq);
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
PanoramiXRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->picture = pict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client);
|
||||
if (result != Success)
|
||||
@@ -2679,7 +2683,7 @@ static int
|
||||
PanoramiXRenderFreePicture(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *pict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
|
||||
@@ -2689,8 +2693,9 @@ PanoramiXRenderFreePicture(ClientPtr client)
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->picture = pict->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client);
|
||||
if (result != Success)
|
||||
break;
|
||||
@@ -2706,7 +2711,7 @@ static int
|
||||
PanoramiXRenderComposite(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *msk, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
xRenderCompositeReq orig;
|
||||
|
||||
REQUEST(xRenderCompositeReq);
|
||||
@@ -2719,20 +2724,21 @@ PanoramiXRenderComposite(ClientPtr client)
|
||||
|
||||
orig = *stuff;
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
stuff->src = src->info[j].id;
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
if (src->u.pict.root) {
|
||||
stuff->xSrc = orig.xSrc - walkScreen->x;
|
||||
stuff->ySrc = orig.ySrc - walkScreen->y;
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
if (dst->u.pict.root) {
|
||||
stuff->xDst = orig.xDst - walkScreen->x;
|
||||
stuff->yDst = orig.yDst - walkScreen->y;
|
||||
}
|
||||
if (msk) {
|
||||
stuff->mask = msk->info[j].id;
|
||||
stuff->mask = msk->info[walkScreenIdx].id;
|
||||
if (msk->u.pict.root) {
|
||||
stuff->xMask = orig.xMask - walkScreen->x;
|
||||
stuff->yMask = orig.yMask - walkScreen->y;
|
||||
@@ -2750,7 +2756,7 @@ static int
|
||||
PanoramiXRenderCompositeGlyphs(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderCompositeGlyphsReq);
|
||||
xGlyphElt origElt, *elt;
|
||||
@@ -2766,14 +2772,15 @@ PanoramiXRenderCompositeGlyphs(ClientPtr client)
|
||||
origElt = *elt;
|
||||
xSrc = stuff->xSrc;
|
||||
ySrc = stuff->ySrc;
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
stuff->src = src->info[j].id;
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
if (src->u.pict.root) {
|
||||
stuff->xSrc = xSrc - walkScreen->x;
|
||||
stuff->ySrc = ySrc - walkScreen->y;
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
if (dst->u.pict.root) {
|
||||
elt->deltax = origElt.deltax - walkScreen->x;
|
||||
elt->deltay = origElt.deltay - walkScreen->y;
|
||||
@@ -2792,7 +2799,7 @@ static int
|
||||
PanoramiXRenderFillRectangles(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderFillRectanglesReq);
|
||||
char *extra;
|
||||
@@ -2803,9 +2810,10 @@ PanoramiXRenderFillRectangles(ClientPtr client)
|
||||
extra_len = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq);
|
||||
if (extra_len && (extra = calloc(1, extra_len))) {
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = walkScreen->x;
|
||||
@@ -2822,7 +2830,7 @@ PanoramiXRenderFillRectangles(ClientPtr client)
|
||||
}
|
||||
}
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
|
||||
if (result != Success)
|
||||
@@ -2838,7 +2846,7 @@ static int
|
||||
PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderTrapezoidsReq);
|
||||
char *extra;
|
||||
@@ -2854,9 +2862,10 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
if (extra_len && (extra = calloc(1, extra_len))) {
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = walkScreen->x;
|
||||
@@ -2882,8 +2891,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client);
|
||||
|
||||
if (result != Success)
|
||||
@@ -2900,7 +2909,7 @@ static int
|
||||
PanoramiXRenderTriangles(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderTrianglesReq);
|
||||
char *extra;
|
||||
@@ -2916,9 +2925,10 @@ PanoramiXRenderTriangles(ClientPtr client)
|
||||
if (extra_len && (extra = calloc(1, extra_len))) {
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = walkScreen->x;
|
||||
@@ -2940,8 +2950,8 @@ PanoramiXRenderTriangles(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderTriangles]) (client);
|
||||
|
||||
if (result != Success)
|
||||
@@ -2958,7 +2968,7 @@ static int
|
||||
PanoramiXRenderTriStrip(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderTriStripReq);
|
||||
char *extra;
|
||||
@@ -2974,9 +2984,10 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
||||
if (extra_len && (extra = calloc(1, extra_len))) {
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = walkScreen->x;
|
||||
@@ -2994,8 +3005,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client);
|
||||
|
||||
if (result != Success)
|
||||
@@ -3012,7 +3023,7 @@ static int
|
||||
PanoramiXRenderTriFan(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderTriFanReq);
|
||||
char *extra;
|
||||
@@ -3028,9 +3039,10 @@ PanoramiXRenderTriFan(ClientPtr client)
|
||||
if (extra_len && (extra = calloc(1, extra_len))) {
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = walkScreen->x;
|
||||
@@ -3048,8 +3060,8 @@ PanoramiXRenderTriFan(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
stuff->src = src->info[walkScreenIdx].id;
|
||||
stuff->dst = dst->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderTriFan]) (client);
|
||||
|
||||
if (result != Success)
|
||||
@@ -3066,7 +3078,7 @@ static int
|
||||
PanoramiXRenderAddTraps(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *picture;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST(xRenderAddTrapsReq);
|
||||
char *extra;
|
||||
@@ -3080,11 +3092,13 @@ PanoramiXRenderAddTraps(ClientPtr client)
|
||||
memcpy(extra, stuff + 1, extra_len);
|
||||
x_off = stuff->xOff;
|
||||
y_off = stuff->yOff;
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[j];
|
||||
if (j)
|
||||
|
||||
unsigned int walkScreenIdx;
|
||||
FOR_NSCREENS_FORWARD(walkScreenIdx) {
|
||||
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
||||
if (walkScreenIdx) /* skip screen #0 */
|
||||
memcpy(stuff + 1, extra, extra_len);
|
||||
stuff->picture = picture->info[j].id;
|
||||
stuff->picture = picture->info[walkScreenIdx].id;
|
||||
|
||||
if (picture->u.pict.root) {
|
||||
stuff->xOff = x_off + walkScreen->x;
|
||||
@@ -3105,7 +3119,7 @@ PanoramiXRenderCreateSolidFill(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateSolidFillReq);
|
||||
PanoramiXRes *newPict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
|
||||
|
||||
@@ -3116,8 +3130,9 @@ PanoramiXRenderCreateSolidFill(ClientPtr client)
|
||||
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->pid = newPict->info[walkScreenIdx].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderCreateSolidFill]) (client);
|
||||
if (result != Success)
|
||||
break;
|
||||
@@ -3136,7 +3151,7 @@ PanoramiXRenderCreateLinearGradient(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateLinearGradientReq);
|
||||
PanoramiXRes *newPict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
|
||||
|
||||
@@ -3147,8 +3162,9 @@ PanoramiXRenderCreateLinearGradient(ClientPtr client)
|
||||
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->pid = newPict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client);
|
||||
if (result != Success)
|
||||
@@ -3168,7 +3184,7 @@ PanoramiXRenderCreateRadialGradient(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateRadialGradientReq);
|
||||
PanoramiXRes *newPict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
|
||||
|
||||
@@ -3179,8 +3195,9 @@ PanoramiXRenderCreateRadialGradient(ClientPtr client)
|
||||
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->pid = newPict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client);
|
||||
if (result != Success)
|
||||
@@ -3200,7 +3217,7 @@ PanoramiXRenderCreateConicalGradient(ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreateConicalGradientReq);
|
||||
PanoramiXRes *newPict;
|
||||
int result = Success, j;
|
||||
int result = Success;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
|
||||
|
||||
@@ -3211,8 +3228,9 @@ PanoramiXRenderCreateConicalGradient(ClientPtr client)
|
||||
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
stuff->pid = newPict->info[walkScreenIdx].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient])
|
||||
(client);
|
||||
|
||||
Reference in New Issue
Block a user