A few days ago I reported a bug (https://bugs.freedesktop.org/show_bug.cgi?id=18378) about XV colorkeying breaking when Metacity compositing is enabled. Michel Dänzer was kind enough to explain the root issue to me, and I prepared a patch, here attached. Please review.

--
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

diff -ur xf86-video-savage-git/configure.ac xf86-video-savage.stock/configure.ac
--- xf86-video-savage-git/configure.ac	2008-05-24 13:59:07.000000000 -0500
+++ xf86-video-savage.stock/configure.ac	2008-11-05 20:39:47.000000000 -0500
@@ -100,6 +100,10 @@
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
               [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
               [#include "xorg-server.h"])
+AC_CHECK_DECL(xf86XVFillKeyHelperDrawable,
+	      [AC_DEFINE(HAVE_XV_DRAWABLE_HELPER, 1, [Have xf86XVFillKeyHelperDrawable prototype])],
+	      [],
+	      [#include "xf86xv.h"])
 CFLAGS="$save_CFLAGS"
 
 if test "x$XSERVER_LIBPCIACCESS" = xyes; then
diff -ur xf86-video-savage-git/src/savage_video.c xf86-video-savage.stock/src/savage_video.c
--- xf86-video-savage-git/src/savage_video.c	2008-02-27 23:06:24.000000000 -0500
+++ xf86-video-savage.stock/src/savage_video.c	2008-11-05 20:30:59.000000000 -0500
@@ -1840,6 +1840,16 @@
 #endif
 }
 
+static void
+SavageFillKeyHelper(DrawablePtr pDraw, uint32_t colorKey, RegionPtr clipBoxes)
+{
+#if HAVE_XV_DRAWABLE_HELPER
+    xf86XVFillKeyHelperDrawable(pDraw, colorKey, clipBoxes);
+#else
+    xf86XVFillKeyHelper(pDraw->pScreen, colorKey, clipBoxes);
+#endif
+}
+
 static int 
 SavagePutImage( 
     ScrnInfoPtr pScrn, 
@@ -1988,7 +1998,7 @@
     if(!REGION_EQUAL(pScreen, &pPriv->clip, clipBoxes)) {
 	REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
 	/* draw these */
-	xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
+	SavageFillKeyHelper(pDraw, pPriv->colorKey, clipBoxes);
 
     }
 
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to