diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-12-28 11:48:14 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-12-28 11:48:14 +0000 |
commit | 08708f7d616a7c0a596fb71dd7acd76d45257fec (patch) | |
tree | 72801eec3487061267cbdbe1c2232b3c42288d5a /render | |
parent | 31d0fdde19598ce9375cc9638ad4e2c8b5af8d9a (diff) |
Merge from xserver: Make the existing ChangePictureFilter and
ChangePictureTransform screen hooks get called at appropriate times.
Diffstat (limited to 'render')
-rw-r--r-- | render/filter.c | 8 | ||||
-rw-r--r-- | render/mipict.c | 18 | ||||
-rw-r--r-- | render/mipict.h | 9 | ||||
-rw-r--r-- | render/picture.c | 7 |
4 files changed, 39 insertions, 3 deletions
diff --git a/render/filter.c b/render/filter.c index 2367f9acc..c43f25dbb 100644 --- a/render/filter.c +++ b/render/filter.c @@ -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; } diff --git a/render/mipict.c b/render/mipict.c index 81c775832..59707ea70 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -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 */ diff --git a/render/mipict.h b/render/mipict.h index e6e8b70fa..0c2ed04d5 100644 --- a/render/mipict.h +++ b/render/mipict.h @@ -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, diff --git a/render/picture.c b/render/picture.c index 3ed60310e..f421c8fb5 100644 --- a/render/picture.c +++ b/render/picture.c @@ -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 |