Merge from xserver: Make the existing ChangePictureFilter and

ChangePictureTransform screen hooks get called at appropriate times.
This commit is contained in:
Eric Anholt 2005-12-28 11:48:14 +00:00
parent 31d0fdde19
commit 08708f7d61
5 changed files with 49 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2005-12-28 Eric Anholt <anholt@FreeBSD.org>
* render/filter.c: (SetPictureFilter):
* render/mipict.c: (miChangePictureTransform),
(miChangePictureFilter), (miPictureInit):
* render/mipict.h:
* render/picture.c: (SetPictureTransform):
Merge from xserver: Make the existing ChangePictureFilter and
ChangePictureTransform screen hooks get called at appropriate times.
2005-12-28 Eric Anholt <anholt@FreeBSD.org>
* fb/fbpict.h:

View File

@ -272,9 +272,10 @@ int
SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams)
{
ScreenPtr pScreen = pPicture->pDrawable->pScreen;
PictureScreenPtr ps = GetPictureScreen(pScreen);
PictFilterPtr pFilter = PictureFindFilter (pScreen, name, len);
xFixed *new_params;
int i;
int i, result;
if (!pFilter)
return BadName;
@ -298,6 +299,9 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int
for (i = 0; i < nparams; i++)
pPicture->filter_params[i] = params[i];
pPicture->filter = pFilter->id;
pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT;
result = (*ps->ChangePictureFilter) (pPicture, pPicture->filter,
params, nparams);
return result;
return Success;
}

View File

@ -250,6 +250,22 @@ miValidatePicture (PicturePtr pPicture,
}
}
int
miChangePictureTransform (PicturePtr pPicture,
PictTransform *transform)
{
return Success;
}
int
miChangePictureFilter (PicturePtr pPicture,
int filter,
xFixed *params,
int nparams)
{
return Success;
}
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
static __inline Bool
@ -611,6 +627,8 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
ps->InitIndexed = miInitIndexed;
ps->CloseIndexed = miCloseIndexed;
ps->UpdateIndexed = miUpdateIndexed;
ps->ChangePictureTransform = miChangePictureTransform;
ps->ChangePictureFilter = miChangePictureFilter;
/* MI rendering routines */
ps->Composite = 0; /* requires DDX support */

View File

@ -71,6 +71,15 @@ void
miValidatePicture (PicturePtr pPicture,
Mask mask);
int
miChangePictureTransform (PicturePtr pPicture,
PictTransform *transform);
int
miChangePictureFilter (PicturePtr pPicture,
int filter,
xFixed *params,
int nparams);
Bool
miClipPicture (RegionPtr pRegion,

View File

@ -1460,6 +1460,9 @@ SetPictureTransform (PicturePtr pPicture,
{ 0x00000, xFixed1, 0x00000 },
{ 0x00000, 0x00000, xFixed1 },
} };
ScreenPtr pScreen = pPicture->pDrawable->pScreen;
PictureScreenPtr ps = GetPictureScreen(pScreen);
int result;
if (transform && memcmp (transform, &identity, sizeof (PictTransform)) == 0)
transform = 0;
@ -1484,7 +1487,9 @@ SetPictureTransform (PicturePtr pPicture,
}
pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT;
return Success;
result = (*ps->ChangePictureTransform) (pPicture, transform);
return result;
}
void