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:
parent
0dede200c9
commit
e41e907b3c
|
@ -2954,6 +2954,7 @@ The sample server implementation is in Xserver/fb/fbscreen.c.</para>
|
||||||
pScreen->SourceValidate(pDrawable, x, y, width, height)
|
pScreen->SourceValidate(pDrawable, x, y, width, height)
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
int x, y, width, height;
|
int x, y, width, height;
|
||||||
|
unsigned int subWindowMode;
|
||||||
|
|
||||||
</programlisting></blockquote>
|
</programlisting></blockquote>
|
||||||
SourceValidate should be called by CopyArea/CopyPlane primitives when
|
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
|
SourceValidate is used by the mi software cursor code to remove the cursor
|
||||||
from the screen when the source rectangle overlaps the cursor position.
|
from the screen when the source rectangle overlaps the cursor position.
|
||||||
x,y,width,height describe the source rectangle (source relative, that is)
|
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>
|
<para>
|
||||||
<blockquote><programlisting>
|
<blockquote><programlisting>
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,8 @@ ExaSrcValidate(DrawablePtr pDrawable,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height,
|
||||||
|
unsigned int subWindowMode)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
|
@ -464,7 +465,7 @@ ExaSrcValidate(DrawablePtr pDrawable,
|
||||||
|
|
||||||
if (pExaScr->SavedSourceValidate) {
|
if (pExaScr->SavedSourceValidate) {
|
||||||
swap(pExaScr, pScreen, SourceValidate);
|
swap(pExaScr, pScreen, SourceValidate);
|
||||||
pScreen->SourceValidate(pDrawable, x, y, width, height);
|
pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode);
|
||||||
swap(pExaScr, pScreen, SourceValidate);
|
swap(pExaScr, pScreen, SourceValidate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,13 +325,14 @@ VGAarbiterGetSpans (
|
||||||
static void
|
static void
|
||||||
VGAarbiterSourceValidate (
|
VGAarbiterSourceValidate (
|
||||||
DrawablePtr pDrawable,
|
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;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
SCREEN_PROLOG (SourceValidate);
|
SCREEN_PROLOG (SourceValidate);
|
||||||
VGAGet(pScreen);
|
VGAGet(pScreen);
|
||||||
if (pScreen->SourceValidate)
|
if (pScreen->SourceValidate)
|
||||||
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate);
|
SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w,
|
||||||
static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr
|
static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr
|
||||||
ppt, int *pwidth, int nspans, char *pdstStart);
|
ppt, int *pwidth, int nspans, char *pdstStart);
|
||||||
static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y,
|
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,
|
static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc);
|
RegionPtr prgnSrc);
|
||||||
static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w,
|
static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w,
|
||||||
|
|
|
@ -57,7 +57,8 @@ XAABitBlt(
|
||||||
if((pSrcDrawable != pDstDrawable) &&
|
if((pSrcDrawable != pDstDrawable) &&
|
||||||
pSrcDrawable->pScreen->SourceValidate) {
|
pSrcDrawable->pScreen->SourceValidate) {
|
||||||
(*pSrcDrawable->pScreen->SourceValidate) (
|
(*pSrcDrawable->pScreen->SourceValidate) (
|
||||||
pSrcDrawable, srcx, srcy, width, height);
|
pSrcDrawable, srcx, srcy, width, height,
|
||||||
|
pGC->subWindowMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
srcx += pSrcDrawable->x;
|
srcx += pSrcDrawable->x;
|
||||||
|
|
|
@ -135,7 +135,8 @@ typedef void (* SourceValidateProcPtr)(
|
||||||
int /*x*/,
|
int /*x*/,
|
||||||
int /*y*/,
|
int /*y*/,
|
||||||
int /*width*/,
|
int /*width*/,
|
||||||
int /*height*/);
|
int /*height*/,
|
||||||
|
unsigned int /*subWindowMode*/);
|
||||||
|
|
||||||
typedef Bool (* CreateWindowProcPtr)(
|
typedef Bool (* CreateWindowProcPtr)(
|
||||||
WindowPtr /*pWindow*/);
|
WindowPtr /*pWindow*/);
|
||||||
|
|
|
@ -186,7 +186,8 @@ miDoCopy (DrawablePtr pSrcDrawable,
|
||||||
if ((pSrcDrawable != pDstDrawable) &&
|
if ((pSrcDrawable != pDstDrawable) &&
|
||||||
pSrcDrawable->pScreen->SourceValidate)
|
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 */
|
/* Compute source clip region */
|
||||||
|
|
|
@ -198,7 +198,8 @@ static void miSpriteGetSpans(DrawablePtr pDrawable, int wMax,
|
||||||
DDXPointPtr ppt, int *pwidth, int nspans,
|
DDXPointPtr ppt, int *pwidth, int nspans,
|
||||||
char *pdstStart);
|
char *pdstStart);
|
||||||
static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y,
|
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,
|
static void miSpriteCopyWindow (WindowPtr pWindow,
|
||||||
DDXPointRec ptOldOrg,
|
DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc);
|
RegionPtr prgnSrc);
|
||||||
|
@ -489,7 +490,7 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width,
|
miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width,
|
||||||
int height)
|
int height, unsigned int subWindowMode)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
DeviceIntPtr pDev;
|
DeviceIntPtr pDev;
|
||||||
|
@ -517,7 +518,7 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pScreen->SourceValidate)
|
if (pScreen->SourceValidate)
|
||||||
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode);
|
||||||
|
|
||||||
SCREEN_EPILOGUE (pPriv, pScreen, SourceValidate);
|
SCREEN_EPILOGUE (pPriv, pScreen, SourceValidate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -898,7 +898,8 @@ damageCopyArea(DrawablePtr pSrc,
|
||||||
pSrc->type == DRAWABLE_WINDOW &&
|
pSrc->type == DRAWABLE_WINDOW &&
|
||||||
((WindowPtr)pSrc)->viewable)
|
((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))
|
if (checkGCDamage (pDst, pGC))
|
||||||
|
@ -944,7 +945,8 @@ damageCopyPlane(DrawablePtr pSrc,
|
||||||
pSrc->type == DRAWABLE_WINDOW &&
|
pSrc->type == DRAWABLE_WINDOW &&
|
||||||
((WindowPtr)pSrc)->viewable)
|
((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))
|
if (checkGCDamage (pDst, pGC))
|
||||||
|
|
|
@ -223,7 +223,8 @@ out:
|
||||||
* here and leave StopDrawing for the block handler.
|
* here and leave StopDrawing for the block handler.
|
||||||
*/
|
*/
|
||||||
static void
|
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);
|
SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate);
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||||
|
@ -231,7 +232,7 @@ RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h)
|
||||||
RootlessStartDrawing(pWin);
|
RootlessStartDrawing(pWin);
|
||||||
}
|
}
|
||||||
if (pDrawable->pScreen->SourceValidate) {
|
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);
|
SCREEN_WRAP(pDrawable->pScreen, SourceValidate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,7 +386,8 @@ miCompositeSourceValidate (PicturePtr pPicture,
|
||||||
}
|
}
|
||||||
x += pPicture->pDrawable->x;
|
x += pPicture->pDrawable->x;
|
||||||
y += pPicture->pDrawable->y;
|
y += pPicture->pDrawable->y;
|
||||||
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
|
||||||
|
pPicture->subWindowMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue