[PATCH v3 1/7] Add subWindowMode parameter to SourceValidate

ville.syrjala at nokia.com ville.syrjala at nokia.com
Tue Jan 4 07:55:47 PST 2011


From: Ville Syrjälä <ville.syrjala at nokia.com>

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

Signed-off-by: Ville Syrjälä <ville.syrjala at nokia.com>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
---
v3: No changes

 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 a2aec2f..f7b2296 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.</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>
 
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index d3c405f..bd533c4 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 e518f45..215e845 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 2920fb5..848e45d 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 5148ed4..dfe51ea 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 00d014c..9952325 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 027c461..50e2667 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 38a6b93..b6f91ef 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -195,7 +195,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);
@@ -479,7 +480,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;
@@ -506,7 +507,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 (pScreen, SourceValidate);
 }
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 21cbb78..d0e0fe4 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 61d2f5d..510d6fd 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 b5b8970..de5eea6 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);
     }
 }
 
-- 
1.7.2.2



More information about the xorg-devel mailing list