Index: programs/Xserver/fb/fbcompose.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbcompose.c,v retrieving revision 1.24 diff -u -r1.24 fbcompose.c --- programs/Xserver/fb/fbcompose.c 4 Oct 2005 03:44:14 -0000 1.24 +++ programs/Xserver/fb/fbcompose.c 7 Dec 2005 02:53:59 -0000 @@ -2724,7 +2724,7 @@ inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16; } while (buffer < end) { - *buffer++ = gradientPixel(pGradient, t, pict->repeat); + *buffer++ = gradientPixel(pGradient, t, pict->repeatType); t += inc; } } else { @@ -2739,7 +2739,7 @@ y = ((xFixed_48_16)v.vector[1] << 16) / v.vector[2]; t = ((a*x + b*y) >> 16) + off; } - *buffer++ = gradientPixel(pGradient, t, pict->repeat); + *buffer++ = gradientPixel(pGradient, t, pict->repeatType); v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; v.vector[2] += unit.vector[2]; @@ -2784,7 +2784,7 @@ double s = (-b + sqrt(det))/(2. * pGradient->radial.a); *buffer = gradientPixel(pGradient, (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), - pict->repeat); + pict->repeatType); ++buffer; rx += cx; ry += cy; @@ -2807,7 +2807,7 @@ s = (-b + sqrt(det))/(2. * pGradient->radial.a); *buffer = gradientPixel(pGradient, (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), - pict->repeat); + pict->repeatType); ++buffer; rx += cx; ry += cy; @@ -2823,7 +2823,7 @@ while (buffer < end) { double angle = atan2(ry, rx) + a; *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), - pict->repeat); + pict->repeatType); ++buffer; rx += cx; ry += cy; @@ -2842,7 +2842,7 @@ y -= pGradient->conical.center.y/65536.; angle = atan2(y, x) + a; *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), - pict->repeat); + pict->repeatType); ++buffer; rx += cx; ry += cy; @@ -2895,7 +2895,7 @@ if (pict->filter == PictFilterNearest) { - if (pict->repeat == RepeatNormal) { + if (pict->repeatType == RepeatNormal) { if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) { box = pict->pCompositeClip->extents; for (i = 0; i < width; ++i) { @@ -2982,7 +2982,7 @@ } } } else if (pict->filter == PictFilterBilinear) { - if (pict->repeat == RepeatNormal) { + if (pict->repeatType == RepeatNormal) { if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) { box = pict->pCompositeClip->extents; for (i = 0; i < width; ++i) { @@ -3270,10 +3270,10 @@ srtot = sgtot = sbtot = satot = 0; for (y = y1; y < y2; y++) { - int ty = (pict->repeat == RepeatNormal) ? MOD (y, pict->pDrawable->height) : y; + int ty = (pict->repeatType == RepeatNormal) ? MOD (y, pict->pDrawable->height) : y; for (x = x1; x < x2; x++) { if (*p) { - int tx = (pict->repeat == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x; + int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x; if (POINT_IN_REGION (0, pict->pCompositeClip, tx, ty, &box)) { FbBits *b = bits + (ty + pict->pDrawable->y)*stride; CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed); @@ -3408,7 +3408,7 @@ fetchSrc = fbFetchSourcePict; } else if (data->src->alphaMap) fetchSrc = fbFetchExternalAlpha; - else if (data->src->repeat == RepeatNormal && + else if (data->src->repeatType == RepeatNormal && data->src->pDrawable->width == 1 && data->src->pDrawable->height == 1) fetchSrc = fbFetchSolid; else if (!data->src->transform && data->src->filter != PictFilterConvolution) @@ -3422,7 +3422,7 @@ fetchMask = fbFetchSourcePict; } else if (data->mask->alphaMap) fetchMask = fbFetchExternalAlpha; - else if (data->mask->repeat == RepeatNormal + else if (data->mask->repeatType == RepeatNormal && data->mask->pDrawable->width == 1 && data->mask->pDrawable->height == 1) fetchMask = fbFetchSolid; else if (!data->mask->transform && data->mask->filter != PictFilterConvolution) @@ -3532,11 +3532,11 @@ FbComposeData compose_data; if (pSrc->pDrawable) - srcRepeat = pSrc->repeat == RepeatNormal && !pSrc->transform + srcRepeat = pSrc->repeatType == RepeatNormal && !pSrc->transform && (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1); if (pMask && pMask->pDrawable) - maskRepeat = pMask->repeat == RepeatNormal && !pMask->transform + maskRepeat = pMask->repeatType == RepeatNormal && !pMask->transform && (pMask->pDrawable->width != 1 || pMask->pDrawable->height != 1); if (op == PictOpOver && !pMask && !pSrc->transform && !PICT_FORMAT_A(pSrc->format) && !pSrc->alphaMap) Index: programs/Xserver/hw/dmx/dmxpict.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/dmx/dmxpict.c,v retrieving revision 1.3 diff -u -r1.3 dmxpict.c --- programs/Xserver/hw/dmx/dmxpict.c 12 Jul 2005 00:52:47 -0000 1.3 +++ programs/Xserver/hw/dmx/dmxpict.c 7 Dec 2005 02:53:59 -0000 @@ -960,8 +960,9 @@ if (pPictPriv->pict) { XRenderPictureAttributes attribs; - if (mask & CPRepeat) - attribs.repeat = pPicture->repeat; + if (mask & CPRepeat) { + attribs.repeat = pPicture->repeatType; + } if (mask & CPAlphaMap) { if (pPicture->alphaMap) { dmxPictPrivPtr pAlphaPriv; Index: programs/Xserver/render/picture.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/picture.c,v retrieving revision 1.19 diff -u -r1.19 picture.c --- programs/Xserver/render/picture.c 6 Oct 2005 08:08:04 -0000 1.19 +++ programs/Xserver/render/picture.c 7 Dec 2005 02:54:04 -0000 @@ -745,6 +745,7 @@ pPicture->freeCompClip = FALSE; pPicture->clientClipType = CT_NONE; pPicture->componentAlpha = FALSE; + pPicture->repeatType = RepeatNone; pPicture->alphaMap = 0; pPicture->alphaOrigin.x = 0; @@ -1174,7 +1175,10 @@ unsigned int newr; newr = NEXT_VAL(unsigned int); if (newr <= RepeatReflect) - pPicture->repeat = newr; + { + pPicture->repeat = (newr != RepeatNone); + pPicture->repeatType = newr; + } else { client->errorValue = newr; @@ -1501,6 +1505,7 @@ { case CPRepeat: pDst->repeat = pSrc->repeat; + pDst->repeatType = pSrc->repeatType; break; case CPAlphaMap: if (pSrc->alphaMap && pSrc->alphaMap->pDrawable->type == DRAWABLE_PIXMAP) Index: programs/Xserver/render/picturestr.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/picturestr.h,v retrieving revision 1.14 diff -u -r1.14 picturestr.h --- programs/Xserver/render/picturestr.h 24 Aug 2005 11:18:33 -0000 1.14 +++ programs/Xserver/render/picturestr.h 7 Dec 2005 02:54:04 -0000 @@ -134,7 +134,7 @@ CARD32 id; PicturePtr pNext; /* chain on same drawable */ - unsigned int repeat : 2; + unsigned int repeat : 1; unsigned int graphicsExposures : 1; unsigned int subWindowMode : 1; unsigned int polyEdge : 1; @@ -142,7 +142,8 @@ unsigned int freeCompClip : 1; unsigned int clientClipType : 2; unsigned int componentAlpha : 1; - unsigned int unused : 22; + unsigned int repeatType : 2; + unsigned int unused : 21; PicturePtr alphaMap; DDXPointRec alphaOrigin;