mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-03 10:30:19 +01:00
Bugzilla #3566 <https://bugs.freedesktop.org/show_bug.cgi?id=3566> Patch
#2906 <https://bugs.freedesktop.org/attachment.cgi?id=2906> Fix for RENDER, repeating pictures and offscreen memory (Owen Taylor)
This commit is contained in:
parent
2acd29c93f
commit
7c84189ea1
1 changed files with 8 additions and 4 deletions
12
fb/fbpict.c
12
fb/fbpict.c
|
|
@ -1265,30 +1265,34 @@ fbComposite (CARD8 op,
|
|||
x_dst = pbox->x1;
|
||||
if (maskRepeat)
|
||||
{
|
||||
y_msk = mod (y_msk, pMask->pDrawable->height);
|
||||
y_msk = mod (y_msk - pMask->pDrawable->y, pMask->pDrawable->height);
|
||||
if (h_this > pMask->pDrawable->height - y_msk)
|
||||
h_this = pMask->pDrawable->height - y_msk;
|
||||
y_msk += pMask->pDrawable->y;
|
||||
}
|
||||
if (srcRepeat)
|
||||
{
|
||||
y_src = mod (y_src, pSrc->pDrawable->height);
|
||||
y_src = mod (y_src - pSrc->pDrawable->y, pSrc->pDrawable->height);
|
||||
if (h_this > pSrc->pDrawable->height - y_src)
|
||||
h_this = pSrc->pDrawable->height - y_src;
|
||||
y_src += pSrc->pDrawable->y;
|
||||
}
|
||||
while (w)
|
||||
{
|
||||
w_this = w;
|
||||
if (maskRepeat)
|
||||
{
|
||||
x_msk = mod (x_msk, pMask->pDrawable->width);
|
||||
x_msk = mod (x_msk - pMask->pDrawable->x, pMask->pDrawable->width);
|
||||
if (w_this > pMask->pDrawable->width - x_msk)
|
||||
w_this = pMask->pDrawable->width - x_msk;
|
||||
x_msk += pMask->pDrawable->x;
|
||||
}
|
||||
if (srcRepeat)
|
||||
{
|
||||
x_src = mod (x_src, pSrc->pDrawable->width);
|
||||
x_src = mod (x_src - pSrc->pDrawable->x, pSrc->pDrawable->width);
|
||||
if (w_this > pSrc->pDrawable->width - x_src)
|
||||
w_this = pSrc->pDrawable->width - x_src;
|
||||
x_src += pSrc->pDrawable->x;
|
||||
}
|
||||
(*func) (op, pSrc, pMask, pDst,
|
||||
x_src, y_src, x_msk, y_msk, x_dst, y_dst,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue