View | Details | Raw Unified | Return to bug 152730
Collapse All | Expand All

(-)fbcompose.c (-13 / +21 lines)
Lines 2875-2882 static void fbFetchTransformed(PicturePt Link Here
2875
    x += xoff;
2875
    x += xoff;
2876
    y += yoff;
2876
    y += yoff;
2877
2877
2878
    v.vector[0] = IntToxFixed(x);
2878
    v.vector[0] = IntToxFixed(x - pict->pDrawable->x);
2879
    v.vector[1] = IntToxFixed(y);
2879
    v.vector[1] = IntToxFixed(y - pict->pDrawable->y);
2880
    v.vector[2] = xFixed1;
2880
    v.vector[2] = xFixed1;
2881
2881
2882
    /* when using convolution filters one might get here without a transform */
2882
    /* when using convolution filters one might get here without a transform */
Lines 2927-2933 static void fbFetchTransformed(PicturePt Link Here
2927
                            y = MOD(v.vector[1]>>16, pict->pDrawable->height);
2927
                            y = MOD(v.vector[1]>>16, pict->pDrawable->height);
2928
                            x = MOD(v.vector[0]>>16, pict->pDrawable->width);
2928
                            x = MOD(v.vector[0]>>16, pict->pDrawable->width);
2929
                        }
2929
                        }
2930
                        if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
2930
                        if (POINT_IN_REGION (0, pict->pCompositeClip, x + pict->pDrawable->x, y + pict->pDrawable->y, &box))
2931
                            buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
2931
                            buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
2932
                        else
2932
                        else
2933
                            buffer[i] = 0;
2933
                            buffer[i] = 0;
Lines 2940-2945 static void fbFetchTransformed(PicturePt Link Here
2940
        } else {
2940
        } else {
2941
            if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
2941
            if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
2942
                box = pict->pCompositeClip->extents;
2942
                box = pict->pCompositeClip->extents;
2943
		box.x1 -= pict->pDrawable->x;
2944
		box.x2 -= pict->pDrawable->x;
2945
		box.y1 -= pict->pDrawable->y;
2946
		box.y2 -= pict->pDrawable->y;
2943
                for (i = 0; i < width; ++i) {
2947
                for (i = 0; i < width; ++i) {
2944
                    if (!v.vector[2]) {
2948
                    if (!v.vector[2]) {
2945
                        buffer[i] = 0;
2949
                        buffer[i] = 0;
Lines 2970-2976 static void fbFetchTransformed(PicturePt Link Here
2970
                            y = v.vector[1]>>16;
2974
                            y = v.vector[1]>>16;
2971
                            x = v.vector[0]>>16;
2975
                            x = v.vector[0]>>16;
2972
                        }
2976
                        }
2973
                        if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
2977
                        if (POINT_IN_REGION (0, pict->pCompositeClip, x + pict->pDrawable->x, y + pict->pDrawable->y, &box))
2974
                            buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
2978
                            buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
2975
                        else
2979
                        else
2976
                            buffer[i] = 0;
2980
                            buffer[i] = 0;
Lines 3082-3095 static void fbFetchTransformed(PicturePt Link Here
3082
3086
3083
                        b = bits + (y1 + pict->pDrawable->y)*stride;
3087
                        b = bits + (y1 + pict->pDrawable->y)*stride;
3084
3088
3085
                        tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
3089
                        tl = POINT_IN_REGION(0, pict->pCompositeClip, x1 + pict->pDrawable->x, y1 + pict->pDrawable->y, &box)
3086
                             ? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
3090
                             ? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
3087
                        tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
3091
                        tr = POINT_IN_REGION(0, pict->pCompositeClip, x2 + pict->pDrawable->x, y1 + pict->pDrawable->y, &box)
3088
                             ? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
3092
                             ? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
3089
                        b = bits + (y2 + pict->pDrawable->y)*stride;
3093
                        b = bits + (y2 + pict->pDrawable->y)*stride;
3090
                        bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
3094
                        bl = POINT_IN_REGION(0, pict->pCompositeClip, x1 + pict->pDrawable->x, y2 + pict->pDrawable->y, &box)
3091
                             ? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
3095
                             ? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
3092
                        br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
3096
                        br = POINT_IN_REGION(0, pict->pCompositeClip, x2 + pict->pDrawable->x, y2 + pict->pDrawable->y, &box)
3093
                             ? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
3097
                             ? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
3094
3098
3095
                        ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
3099
                        ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
Lines 3114-3119 static void fbFetchTransformed(PicturePt Link Here
3114
        } else {
3118
        } else {
3115
            if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
3119
            if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
3116
                box = pict->pCompositeClip->extents;
3120
                box = pict->pCompositeClip->extents;
3121
		box.x1 -= pict->pDrawable->x;
3122
		box.x2 -= pict->pDrawable->x;
3123
		box.y1 -= pict->pDrawable->y;
3124
		box.y2 -= pict->pDrawable->y;
3117
                for (i = 0; i < width; ++i) {
3125
                for (i = 0; i < width; ++i) {
3118
                    if (!v.vector[2]) {
3126
                    if (!v.vector[2]) {
3119
                        buffer[i] = 0;
3127
                        buffer[i] = 0;
Lines 3209-3222 static void fbFetchTransformed(PicturePt Link Here
3209
                        b = bits + (y1 + pict->pDrawable->y)*stride;
3217
                        b = bits + (y1 + pict->pDrawable->y)*stride;
3210
                        x_off = x1 + pict->pDrawable->x;
3218
                        x_off = x1 + pict->pDrawable->x;
3211
3219
3212
                        tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
3220
                        tl = POINT_IN_REGION(0, pict->pCompositeClip, x1 + pict->pDrawable->x, y1 + pict->pDrawable->y, &box)
3213
                             ? fetch(b, x_off, indexed) : 0;
3221
                             ? fetch(b, x_off, indexed) : 0;
3214
                        tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
3222
                        tr = POINT_IN_REGION(0, pict->pCompositeClip, x2 + pict->pDrawable->x, y1 + pict->pDrawable->y, &box)
3215
                             ? fetch(b, x_off + 1, indexed) : 0;
3223
                             ? fetch(b, x_off + 1, indexed) : 0;
3216
                        b += stride;
3224
                        b += stride;
3217
                        bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
3225
                        bl = POINT_IN_REGION(0, pict->pCompositeClip, x1 + pict->pDrawable->x, y2 + pict->pDrawable->y, &box)
3218
                             ? fetch(b, x_off, indexed) : 0;
3226
                             ? fetch(b, x_off, indexed) : 0;
3219
                        br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
3227
                        br = POINT_IN_REGION(0, pict->pCompositeClip, x2 + pict->pDrawable->x, y2 + pict->pDrawable->y, &box)
3220
                             ? fetch(b, x_off + 1, indexed) : 0;
3228
                             ? fetch(b, x_off + 1, indexed) : 0;
3221
3229
3222
                        ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
3230
                        ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
Lines 3274-3280 static void fbFetchTransformed(PicturePt Link Here
3274
                    for (x = x1; x < x2; x++) {
3282
                    for (x = x1; x < x2; x++) {
3275
                        if (*p) {
3283
                        if (*p) {
3276
                            int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
3284
                            int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
3277
                            if (POINT_IN_REGION (0, pict->pCompositeClip, tx, ty, &box)) {
3285
                            if (POINT_IN_REGION (0, pict->pCompositeClip, tx + pict->pDrawable->x, ty + pict->pDrawable->y, &box)) {
3278
                                FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
3286
                                FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
3279
                                CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
3287
                                CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
3280
3288

Return to bug 152730