mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 20:40:04 +01:00
Revert "Remove geometry arguments from miSourceValidate()"
This should not have been there, and I'm honestly not sure why
I even had it on my branch...
Sorry for the noise. I'm going to go hide in a corner now.
This reverts commit 4975887a30.
This commit is contained in:
parent
fd9421b35a
commit
6526e693d7
3 changed files with 54 additions and 19 deletions
|
|
@ -54,9 +54,9 @@ fbComposite (CARD8 op,
|
||||||
int msk_xoff, msk_yoff;
|
int msk_xoff, msk_yoff;
|
||||||
int dst_xoff, dst_yoff;
|
int dst_xoff, dst_yoff;
|
||||||
|
|
||||||
miCompositeSourceValidate (pSrc);
|
miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
|
||||||
if (pMask)
|
if (pMask)
|
||||||
miCompositeSourceValidate (pMask);
|
miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
|
||||||
|
|
||||||
src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
|
src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
|
||||||
mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
|
mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
|
||||||
|
|
|
||||||
|
|
@ -333,8 +333,12 @@ miClipPictureSrc (RegionPtr pRegion,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
SourceValidateOnePicture (PicturePtr pPicture)
|
miCompositeSourceValidate (PicturePtr pPicture,
|
||||||
|
INT16 x,
|
||||||
|
INT16 y,
|
||||||
|
CARD16 width,
|
||||||
|
CARD16 height)
|
||||||
{
|
{
|
||||||
DrawablePtr pDrawable = pPicture->pDrawable;
|
DrawablePtr pDrawable = pPicture->pDrawable;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
@ -346,17 +350,45 @@ SourceValidateOnePicture (PicturePtr pPicture)
|
||||||
|
|
||||||
if (pScreen->SourceValidate)
|
if (pScreen->SourceValidate)
|
||||||
{
|
{
|
||||||
pScreen->SourceValidate (
|
if (pPicture->transform)
|
||||||
pDrawable, 0, 0, pDrawable->width, pDrawable->height, pPicture->subWindowMode);
|
{
|
||||||
}
|
xPoint points[4];
|
||||||
}
|
int i;
|
||||||
|
int xmin, ymin, xmax, ymax;
|
||||||
|
|
||||||
void
|
#define VectorSet(i,_x,_y) { points[i].x = _x; points[i].y = _y; }
|
||||||
miCompositeSourceValidate (PicturePtr pPicture)
|
VectorSet (0, x, y);
|
||||||
{
|
VectorSet (1, x + width, y);
|
||||||
SourceValidateOnePicture (pPicture);
|
VectorSet (2, x, y + height);
|
||||||
if (pPicture->alphaMap)
|
VectorSet (3, x + width, y + height);
|
||||||
SourceValidateOnePicture (pPicture->alphaMap);
|
xmin = ymin = 32767;
|
||||||
|
xmax = ymax = -32737;
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
PictVector t;
|
||||||
|
t.vector[0] = IntToxFixed (points[i].x);
|
||||||
|
t.vector[1] = IntToxFixed (points[i].y);
|
||||||
|
t.vector[2] = xFixed1;
|
||||||
|
if (pixman_transform_point (pPicture->transform, &t))
|
||||||
|
{
|
||||||
|
int tx = xFixedToInt (t.vector[0]);
|
||||||
|
int ty = xFixedToInt (t.vector[1]);
|
||||||
|
if (tx < xmin) xmin = tx;
|
||||||
|
if (tx > xmax) xmax = tx;
|
||||||
|
if (ty < ymin) ymin = ty;
|
||||||
|
if (ty > ymax) ymax = ty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x = xmin;
|
||||||
|
y = ymin;
|
||||||
|
width = xmax - xmin;
|
||||||
|
height = ymax - ymin;
|
||||||
|
}
|
||||||
|
x += pPicture->pDrawable->x;
|
||||||
|
y += pPicture->pDrawable->y;
|
||||||
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
|
||||||
|
pPicture->subWindowMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -448,9 +480,9 @@ miComputeCompositeRegion (RegionPtr pRegion,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
miCompositeSourceValidate (pSrc);
|
miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
|
||||||
if (pMask)
|
if (pMask)
|
||||||
miCompositeSourceValidate (pMask);
|
miCompositeSourceValidate (pMask, xMask, yMask, width, height);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,11 @@ miChangePictureFilter (PicturePtr pPicture,
|
||||||
int nparams);
|
int nparams);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
miCompositeSourceValidate (PicturePtr pPicture);
|
miCompositeSourceValidate (PicturePtr pPicture,
|
||||||
|
INT16 x,
|
||||||
|
INT16 y,
|
||||||
|
CARD16 width,
|
||||||
|
CARD16 height);
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
miComputeCompositeRegion (RegionPtr pRegion,
|
miComputeCompositeRegion (RegionPtr pRegion,
|
||||||
PicturePtr pSrc,
|
PicturePtr pSrc,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue