From e41e907b3c19908f5316346fa587ced3115478cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Wed, 5 Jan 2011 20:41:04 +0200 Subject: [PATCH] Add subWindowMode parameter to SourceValidate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass the subWindowMode from the GC/source Picture to SourceValidate. Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Stone Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- doc/xml/Xserver-spec.xml | 4 +++- exa/exa_unaccel.c | 5 +++-- hw/xfree86/common/xf86VGAarbiter.c | 5 +++-- hw/xfree86/common/xf86VGAarbiterPriv.h | 2 +- hw/xfree86/xaa/xaaBitBlt.c | 3 ++- include/scrnintstr.h | 3 ++- mi/micopy.c | 3 ++- mi/misprite.c | 7 ++++--- miext/damage/damage.c | 6 ++++-- miext/rootless/rootlessScreen.c | 5 +++-- render/mipict.c | 3 ++- 11 files changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/xml/Xserver-spec.xml b/doc/xml/Xserver-spec.xml index a2aec2f0f3..f7b2296a22 100644 --- a/doc/xml/Xserver-spec.xml +++ b/doc/xml/Xserver-spec.xml @@ -2954,6 +2954,7 @@ The sample server implementation is in Xserver/fb/fbscreen.c. pScreen->SourceValidate(pDrawable, x, y, width, height) DrawablePtr pDrawable; int x, y, width, height; + unsigned int subWindowMode; SourceValidate should be called by CopyArea/CopyPlane primitives when @@ -2963,7 +2964,8 @@ you will never need SourceValidate, you can avoid this check. Currently, SourceValidate is used by the mi software cursor code to remove the cursor from the screen when the source rectangle overlaps the cursor position. x,y,width,height describe the source rectangle (source relative, that is) -for the copy operation. +for the copy operation. subWindowMode comes from the GC or source Picture. +
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index d3c405fb13..bd533c4027 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -438,7 +438,8 @@ ExaSrcValidate(DrawablePtr pDrawable, int x, int y, int width, - int height) + int height, + unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); @@ -464,7 +465,7 @@ ExaSrcValidate(DrawablePtr pDrawable, if (pExaScr->SavedSourceValidate) { swap(pExaScr, pScreen, SourceValidate); - pScreen->SourceValidate(pDrawable, x, y, width, height); + pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode); swap(pExaScr, pScreen, SourceValidate); } } diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c index e518f455fc..215e8454ad 100644 --- a/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c @@ -325,13 +325,14 @@ VGAarbiterGetSpans ( static void VGAarbiterSourceValidate ( DrawablePtr pDrawable, - int x, int y, int width, int height ) + int x, int y, int width, int height, + unsigned int subWindowMode ) { ScreenPtr pScreen = pDrawable->pScreen; SCREEN_PROLOG (SourceValidate); VGAGet(pScreen); if (pScreen->SourceValidate) - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode); VGAPut(); SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate); } diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h index 2920fb53a5..848e45da7a 100644 --- a/hw/xfree86/common/xf86VGAarbiterPriv.h +++ b/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -149,7 +149,7 @@ static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w, static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y, - int width, int height); + int width, int height, unsigned int subWindowMode); static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w, diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c index 5148ed4a2d..dfe51ea092 100644 --- a/hw/xfree86/xaa/xaaBitBlt.c +++ b/hw/xfree86/xaa/xaaBitBlt.c @@ -57,7 +57,8 @@ XAABitBlt( if((pSrcDrawable != pDstDrawable) && pSrcDrawable->pScreen->SourceValidate) { (*pSrcDrawable->pScreen->SourceValidate) ( - pSrcDrawable, srcx, srcy, width, height); + pSrcDrawable, srcx, srcy, width, height, + pGC->subWindowMode); } srcx += pSrcDrawable->x; diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 00d014ca89..9952325249 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -135,7 +135,8 @@ typedef void (* SourceValidateProcPtr)( int /*x*/, int /*y*/, int /*width*/, - int /*height*/); + int /*height*/, + unsigned int /*subWindowMode*/); typedef Bool (* CreateWindowProcPtr)( WindowPtr /*pWindow*/); diff --git a/mi/micopy.c b/mi/micopy.c index 027c461fe4..50e2667520 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -186,7 +186,8 @@ miDoCopy (DrawablePtr pSrcDrawable, if ((pSrcDrawable != pDstDrawable) && pSrcDrawable->pScreen->SourceValidate) { - (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); + (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc, + pGC->subWindowMode); } /* Compute source clip region */ diff --git a/mi/misprite.c b/mi/misprite.c index c25c093f23..770951e8f4 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -198,7 +198,8 @@ static void miSpriteGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, - int width, int height); + int width, int height, + unsigned int subWindowMode); static void miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); @@ -489,7 +490,7 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, static void miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, - int height) + int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; DeviceIntPtr pDev; @@ -517,7 +518,7 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, } if (pScreen->SourceValidate) - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode); SCREEN_EPILOGUE (pPriv, pScreen, SourceValidate); } diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 21cbb78c99..d0e0fe4d36 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -898,7 +898,8 @@ damageCopyArea(DrawablePtr pSrc, pSrc->type == DRAWABLE_WINDOW && ((WindowPtr)pSrc)->viewable) { - (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height); + (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height, + pGC->subWindowMode); } if (checkGCDamage (pDst, pGC)) @@ -944,7 +945,8 @@ damageCopyPlane(DrawablePtr pSrc, pSrc->type == DRAWABLE_WINDOW && ((WindowPtr)pSrc)->viewable) { - (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height); + (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height, + pGC->subWindowMode); } if (checkGCDamage (pDst, pGC)) diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 61d2f5dab1..510d6fdb17 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -223,7 +223,8 @@ out: * here and leave StopDrawing for the block handler. */ static void -RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) +RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int subWindowMode) { SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate); if (pDrawable->type == DRAWABLE_WINDOW) { @@ -231,7 +232,7 @@ RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) RootlessStartDrawing(pWin); } if (pDrawable->pScreen->SourceValidate) { - pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h); + pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h, subWindowMode); } SCREEN_WRAP(pDrawable->pScreen, SourceValidate); } diff --git a/render/mipict.c b/render/mipict.c index b5b8970374..de5eea6bee 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -386,7 +386,8 @@ miCompositeSourceValidate (PicturePtr pPicture, } x += pPicture->pDrawable->x; y += pPicture->pDrawable->y; - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, + pPicture->subWindowMode); } }