Add subWindowMode parameter to SourceValidate

Pass the subWindowMode from the GC/source Picture to SourceValidate.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Ville Syrjälä 2011-01-05 20:41:04 +02:00 committed by Keith Packard
parent 0dede200c9
commit e41e907b3c
11 changed files with 29 additions and 17 deletions

View File

@ -2954,6 +2954,7 @@ The sample server implementation is in Xserver/fb/fbscreen.c.</para>
pScreen->SourceValidate(pDrawable, x, y, width, height)
DrawablePtr pDrawable;
int x, y, width, height;
unsigned int subWindowMode;
</programlisting></blockquote>
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.</para>
for the copy operation. subWindowMode comes from the GC or source Picture.
</para>
<para>
<blockquote><programlisting>

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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,

View File

@ -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;

View File

@ -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*/);

View File

@ -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 */

View File

@ -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);
}

View File

@ -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))

View File

@ -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);
}

View File

@ -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);
}
}