mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
Add support for gradients and solid fills to Render.
Changed the semantics of the Convolution filter a bit. It now doesn't try
to normalize the filter values but leaves this to the client. This
gives more reasonable behaviour in the limit where the filter
parameters sum up to 0.
This commit is contained in:
parent
30c019e847
commit
b5b2a0522e
8 changed files with 990 additions and 100 deletions
21
fb/fbpict.c
21
fb/fbpict.c
|
|
@ -838,7 +838,7 @@ fbComposite (CARD8 op,
|
|||
int n;
|
||||
BoxPtr pbox;
|
||||
CompositeFunc func = 0;
|
||||
Bool srcRepeat = pSrc->repeat;
|
||||
Bool srcRepeat = pSrc->pDrawable && pSrc->repeat == RepeatNormal;
|
||||
Bool maskRepeat = FALSE;
|
||||
Bool srcAlphaMap = pSrc->alphaMap != 0;
|
||||
Bool maskAlphaMap = FALSE;
|
||||
|
|
@ -848,20 +848,23 @@ fbComposite (CARD8 op,
|
|||
|
||||
xDst += pDst->pDrawable->x;
|
||||
yDst += pDst->pDrawable->y;
|
||||
xSrc += pSrc->pDrawable->x;
|
||||
ySrc += pSrc->pDrawable->y;
|
||||
if (pMask)
|
||||
if (pSrc->pDrawable) {
|
||||
xSrc += pSrc->pDrawable->x;
|
||||
ySrc += pSrc->pDrawable->y;
|
||||
}
|
||||
if (pMask && pMask->pDrawable)
|
||||
{
|
||||
xMask += pMask->pDrawable->x;
|
||||
yMask += pMask->pDrawable->y;
|
||||
maskRepeat = pMask->repeat;
|
||||
maskRepeat = pMask->repeat == RepeatNormal;
|
||||
maskAlphaMap = pMask->alphaMap != 0;
|
||||
}
|
||||
|
||||
if (!pSrc->transform && !(pMask && pMask->transform)
|
||||
&& !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
|
||||
&& (pSrc->filter != PictFilterConvolution)
|
||||
&& (!pMask || pMask->filter != PictFilterConvolution))
|
||||
if (pSrc->pDrawable && (!pMask || pMask->pDrawable)
|
||||
&& !pSrc->transform && !(pMask && pMask->transform)
|
||||
&& !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
|
||||
&& (pSrc->filter != PictFilterConvolution)
|
||||
&& (!pMask || pMask->filter != PictFilterConvolution))
|
||||
switch (op) {
|
||||
case PictOpSrc:
|
||||
#ifdef USE_MMX
|
||||
|
|
|
|||
Loading…
Reference in a new issue