From 08708f7d616a7c0a596fb71dd7acd76d45257fec Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 28 Dec 2005 11:48:14 +0000 Subject: [PATCH] Merge from xserver: Make the existing ChangePictureFilter and ChangePictureTransform screen hooks get called at appropriate times. --- ChangeLog | 10 ++++++++++ render/filter.c | 8 ++++++-- render/mipict.c | 18 ++++++++++++++++++ render/mipict.h | 9 +++++++++ render/picture.c | 7 ++++++- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7aa29fa3..2beb1b7ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-12-28 Eric Anholt + + * 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 * fb/fbpict.h: 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