v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2 - 1;
v.vector[2] = pixman_fixed_1;
- /* when using convolution filters one might get here without a transform */
+ /* when using convolution filters or PIXMAN_REPEAT_PAD one might get here without a transform */
if (pict->common.transform)
{
if (!pixman_transform_point_3d (pict->common.transform, &v))
fetchSrc = (scanFetchProc)fbFetchSolid;
srcClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
}
- else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION)
+ else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
+ && bits->common.repeat != PIXMAN_REPEAT_PAD)
{
fetchSrc = (scanFetchProc)fbFetch;
}
fetchMask = (scanFetchProc)fbFetchSolid;
maskClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
}
- else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION)
+ else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
+ && bits->common.repeat != PIXMAN_REPEAT_PAD)
fetchMask = (scanFetchProc)fbFetch;
else
fetchMask = (scanFetchProc)fbFetchTransformed;
const pixman_box16_t *pbox;
int w, h, w_this, h_this;
int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
- int x_src_pad_backup = 0, y_src_pad_backup = 0;
pixman_region16_t reg;
pixman_region16_t *region;
- pixman_bool_t srcPad = pSrc->type == BITS && pSrc->common.repeat == PIXMAN_REPEAT_PAD;
pixman_region_init (®);
if (!pixman_compute_composite_region (®, pSrc, pMask, pDst,
if (h_this > pSrc->bits.height - y_src)
h_this = pSrc->bits.height - y_src;
}
- else if (srcPad)
- {
- y_src_pad_backup = y_src;
- if (y_src < 0)
- {
- y_src = 0;
- h_this = 1;
- }
- else if (y_src > pSrc->bits.height - 1)
- {
- y_src = pSrc->bits.height - 1;
- h_this = 1;
- }
- else if (h_this > pSrc->bits.height - y_src)
- {
- h_this = pSrc->bits.height - y_src;
- }
- }
while (w)
{
w_this = w;
if (w_this > pSrc->bits.width - x_src)
w_this = pSrc->bits.width - x_src;
}
- else if (srcPad)
- {
- x_src_pad_backup = x_src;
- if (x_src < 0)
- {
- x_src = 0;
- w_this = 1;
- }
- else if (x_src > pSrc->bits.width - 1)
- {
- x_src = pSrc->bits.width - 1;
- w_this = 1;
- }
- else if (w_this > pSrc->bits.width - x_src)
- {
- w_this = pSrc->bits.width - x_src;
- }
- }
(*compositeRect) (op, pSrc, pMask, pDst,
x_src, y_src, x_msk, y_msk, x_dst, y_dst,
w_this, h_this);
- if (srcPad)
- x_src = x_src_pad_backup;
w -= w_this;
x_src += w_this;
x_msk += w_this;
x_dst += w_this;
}
- if (srcPad)
- y_src = y_src_pad_backup;
h -= h_this;
y_src += h_this;
y_msk += h_this;
&& !srcTransform && !maskTransform
&& !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
&& (pSrc->common.filter != PIXMAN_FILTER_CONVOLUTION)
- && (!pMask || pMask->common.filter != PIXMAN_FILTER_CONVOLUTION)
+ && (pSrc->common.repeat != PIXMAN_REPEAT_PAD)
+ && (!pMask || (pMask->common.filter != PIXMAN_FILTER_CONVOLUTION && pMask->common.repeat != PIXMAN_REPEAT_PAD))
&& !pSrc->common.read_func && !pSrc->common.write_func
&& !(pMask && pMask->common.read_func) && !(pMask && pMask->common.write_func)
&& !pDst->common.read_func && !pDst->common.write_func)
srcRepeat = FALSE;
if (maskTransform)
- maskTransform = FALSE;
+ maskRepeat = FALSE;
}
pixman_walk_composite_region (op, pSrc, pMask, pDst, xSrc, ySrc,