xserver: Branch 'master' - 3 commits

Eric Anholt anholt at kemper.freedesktop.org
Thu Apr 19 00:33:33 EEST 2007


 configure.ac                  |    7 +++----
 hw/xfree86/modes/xf86Rotate.c |   10 +++++++++-
 mi/Makefile.am                |    7 ++-----
 mi/misprite.c                 |   37 +++++++++++++++++++++++++++++++++----
 mi/misprite.h                 |    2 ++
 mi/mispritest.h               |    1 +
 6 files changed, 50 insertions(+), 14 deletions(-)

New commits:
diff-tree 999b681cf3973af4191506e49cde06963b11a774 (from 28bb34eec63bf3c98f38ba7fc044f6419aaa3307)
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Apr 18 14:33:27 2007 -0700

    Suppress software cursor removal during rotated shadow buffer drawing.

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e8fafd0..5127c15 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -39,6 +39,7 @@
 #include "xf86Crtc.h"
 #include "xf86Modes.h"
 #include "xf86RandR12.h"
+#include "misprite.h"
 #include "X11/extensions/render.h"
 #define DPMS_SERVER
 #include "X11/extensions/dpms.h"
@@ -279,7 +280,11 @@ xf86RotateRedisplay(ScreenPtr pScreen)
     if (REGION_NOTEMPTY(pScreen, region)) 
     {
 	int		    c;
-	
+
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7,2,0,0,dummy)
+	/* Disable software cursor removal for this drawing */
+	miSpriteDrawInternal(pScreen, TRUE);
+#endif
 	for (c = 0; c < xf86_config->num_crtc; c++)
 	{
 	    xf86CrtcPtr	    crtc = xf86_config->crtc[c];
@@ -304,6 +309,9 @@ xf86RotateRedisplay(ScreenPtr pScreen)
 		REGION_UNINIT (pScreen, &crtc_damage);
 	    }
 	}
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7,2,0,0,dummy)
+	miSpriteDrawInternal(pScreen, FALSE);
+#endif
 	DamageEmpty(damage);
     }
 }
diff --git a/mi/misprite.c b/mi/misprite.c
index c0560a4..71e6ab0 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -288,7 +288,8 @@ miSpriteGetImage (pDrawable, sx, sy, w, 
 
     pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
 
-    if (pDrawable->type == DRAWABLE_WINDOW &&
+    if (pScreenPriv->internalDraw == 0 &&
+	pDrawable->type == DRAWABLE_WINDOW &&
         pScreenPriv->isUp &&
 	ORG_OVERLAP(&pScreenPriv->saved,pDrawable->x,pDrawable->y, sx, sy, w, h))
     {
@@ -318,7 +319,8 @@ miSpriteGetSpans (pDrawable, wMax, ppt, 
 
     pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
 
-    if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp)
+    if (pScreenPriv->internalDraw == 0 &&
+	pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp)
     {
 	DDXPointPtr    	pts;
 	int    		*widths;
@@ -360,7 +362,8 @@ miSpriteSourceValidate (pDrawable, x, y,
 
     pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
 
-    if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp &&
+    if (pScreenPriv->internalDraw == 0 &&
+	pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp &&
 	ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y,
 		    x, y, width, height))
     {
@@ -386,7 +389,8 @@ miSpriteCopyWindow (WindowPtr pWindow, D
     /*
      * Damage will take care of destination check
      */
-    if (pScreenPriv->isUp &&
+    if (pScreenPriv->internalDraw == 0 &&
+	pScreenPriv->isUp &&
 	RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->saved) != rgnOUT)
     {
 	SPRITE_DEBUG (("CopyWindow remove\n"));
@@ -827,3 +831,28 @@ miSpriteComputeSaved (pScreen)
     pScreenPriv->saved.x2 = pScreenPriv->saved.x1 + w + wpad * 2;
     pScreenPriv->saved.y2 = pScreenPriv->saved.y1 + h + hpad * 2;
 }
+
+/**
+ * Enables internal drawing support, which disables removal of the
+ * cursor when the screen pixmap is sourced from.
+ *
+ * This can be used to allow software cursors to be read by RandR rotation
+ * shadow code.
+ */
+void
+miSpriteDrawInternal(ScreenPtr pScreen, Bool enable)
+{
+    miSpriteScreenPtr   pScreenPriv;
+
+    /* Check that miSprite has been set up this generation */
+    if (miSpriteGeneration != serverGeneration)
+	return;
+
+    pScreenPriv = (miSpriteScreenPtr)
+	pScreen->devPrivates[miSpriteScreenIndex].ptr;
+
+    if (enable)
+	pScreenPriv->internalDraw++;
+    else
+	pScreenPriv->internalDraw--;
+}
diff --git a/mi/misprite.h b/mi/misprite.h
index 5173b77..0a1bcc1 100644
--- a/mi/misprite.h
+++ b/mi/misprite.h
@@ -92,3 +92,5 @@ extern Bool miSpriteInitialize(
     miSpriteCursorFuncPtr /*cursorFuncs*/,
     miPointerScreenFuncPtr /*screenFuncs*/
 );
+
+void miSpriteDrawInternal(ScreenPtr pScreen, Bool enable);
diff --git a/mi/mispritest.h b/mi/mispritest.h
index 5075f05..2deaa45 100644
--- a/mi/mispritest.h
+++ b/mi/mispritest.h
@@ -76,6 +76,7 @@ typedef struct {
     WindowPtr	    pCacheWin;		/* window the cursor last seen in */
     Bool	    isInCacheWin;
     Bool	    checkPixels;	/* check colormap collision */
+    int		    internalDraw;
     xColorItem	    colors[2];
     ColormapPtr	    pInstalledMap;
     ColormapPtr	    pColormap;
diff-tree 28bb34eec63bf3c98f38ba7fc044f6419aaa3307 (from 5d8e8a7f4b3226bffd9e4d6d9326688f475b0183)
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Apr 18 13:48:28 2007 -0700

    Belatedly bump XORG_VERSION for 7.2.

diff --git a/configure.ac b/configure.ac
index edec92c..872f376 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,9 +382,9 @@ AC_DEFINE_UNQUOTED(OSNAME, "$OSNAME", 
 DEFAULT_VENDOR_NAME="The X.Org Foundation"
 DEFAULT_VENDOR_NAME_SHORT="X.Org"
 DEFAULT_VERSION_MAJOR=7
-DEFAULT_VERSION_MINOR=1
-DEFAULT_VERSION_PATCH=99
-DEFAULT_VERSION_SNAP=2
+DEFAULT_VERSION_MINOR=2
+DEFAULT_VERSION_PATCH=0
+DEFAULT_VERSION_SNAP=0
 DEFAULT_RELEASE_DATE="21 December 2005"
 DEFAULT_VENDOR_WEB="http://wiki.x.org"
 
diff-tree 5d8e8a7f4b3226bffd9e4d6d9326688f475b0183 (from 53fb42e65c2b2ff58a4a324b7f05cff8a587720a)
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Apr 18 13:22:26 2007 -0700

    Remove libminimi build.
    
    It appears to have been a leftover of a previous incarnation of the build
    system that didn't handle miinitext.c well.

diff --git a/configure.ac b/configure.ac
index cb8b435..edec92c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -986,7 +986,6 @@ else
 fi
 CWRAP_LIB='$(top_builddir)/os/libcwrapper.la'
 MI_LIB='$(top_builddir)/mi/libmi.la'
-MINIMI_LIB='$(top_builddir)/mi/libminimi.la'
 MI_EXT_LIB='$(top_builddir)/mi/libmiext.la'
 MI_INC='-I$(top_srcdir)/mi'
 FB_LIB='$(top_builddir)/fb/libfb.la'
diff --git a/mi/Makefile.am b/mi/Makefile.am
index 42f75ae..f262f4b 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -1,4 +1,4 @@
-noinst_LTLIBRARIES = libminimi.la libmi.la
+noinst_LTLIBRARIES = libmi.la
 
 if XORG
 sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \
@@ -8,8 +8,7 @@ endif
 
 AM_CFLAGS = $(DIX_CFLAGS)
 
-# libminimi is for dmx - it has different defines for miinitext.c
-libminimi_la_SOURCES = 	\
+libmi_la_SOURCES = 	\
 	cbrt.c		\
 	mi.h		\
 	miarc.c		\
@@ -70,6 +69,4 @@ libminimi_la_SOURCES = 	\
 	mizerclip.c	\
 	mizerline.c
 
-libmi_la_SOURCES = $(libminimi_la_SOURCES)
-
 INCLUDES = -I$(top_srcdir)/mfb



More information about the xorg-commit mailing list