Merge from xserver: Make the existing ChangePictureFilter and
ChangePictureTransform screen hooks get called at appropriate times.
This commit is contained in:
parent
31d0fdde19
commit
08708f7d61
10
ChangeLog
10
ChangeLog
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user