[PATCH] XFree86: Xv: Add ClipNotify helper
Eric Anholt
eric at anholt.net
Thu Jan 8 14:51:33 PST 2009
On Mon, 2009-01-05 at 11:38 +0200, Daniel Stone wrote:
> Add a ClipNotify helper that lets the driver know about changes in the
> clipping of an Xv backing drawable. This is useful for drivers that
> cannot implement more than a single bounding box.
Note: this is an ABI bump, since drivers are doing
malloc(sizeof(XF86VideoAdaptorRec) + sizeof(myprivate))
No opinion either way.
> Signed-off-by: Daniel Stone <daniel.stone at collabora.co.uk>
> ---
> hw/xfree86/common/xf86xv.c | 4 ++++
> hw/xfree86/common/xf86xv.h | 3 +++
> hw/xfree86/common/xf86xvpriv.h | 1 +
> 3 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
> index 85b13d3..abbe033 100644
> --- a/hw/xfree86/common/xf86xv.c
> +++ b/hw/xfree86/common/xf86xv.c
> @@ -1123,6 +1123,10 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
>
> pPriv->pCompositeClip = NULL;
>
> + if (pPriv->AdaptorRec->ClipNotify)
> + (*pPriv->AdaptorRec->ClipNotify)(pPriv->pScrn, pPriv->DevPriv.ptr,
> + pWin, dx, dy);
> +
> /* Stop everything except images, but stop them too if the
> window isn't visible. But we only remove the images. */
>
> diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h
> index e98c423..c3db6cc 100644
> --- a/hw/xfree86/common/xf86xv.h
> +++ b/hw/xfree86/common/xf86xv.h
> @@ -112,6 +112,8 @@ typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y,
> typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn,
> int image, unsigned short *width, unsigned short *height,
> int *pitches, int *offsets);
> +typedef void (*ClipNotifyFuncPtr)(ScrnInfoPtr pScrn, pointer data,
> + WindowPtr window, int dx, int dy);
>
> typedef enum {
> XV_OFF,
> @@ -165,6 +167,7 @@ typedef struct {
> PutImageFuncPtr PutImage;
> ReputImageFuncPtr ReputImage;
> QueryImageAttributesFuncPtr QueryImageAttributes;
> + ClipNotifyFuncPtr ClipNotify;
> } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
>
> typedef struct {
> diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h
> index 761fc3a..7623d29 100644
> --- a/hw/xfree86/common/xf86xvpriv.h
> +++ b/hw/xfree86/common/xf86xvpriv.h
> @@ -59,6 +59,7 @@ typedef struct {
> PutImageFuncPtr PutImage;
> ReputImageFuncPtr ReputImage;
> QueryImageAttributesFuncPtr QueryImageAttributes;
> + ClipNotifyFuncPtr ClipNotify;
> } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
>
> typedef struct {
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20090108/1c00f7b5/attachment.pgp>
More information about the xorg
mailing list