summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--src/radeon_video.c15
2 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e52bcd9..4599429 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,6 +219,12 @@ if test "x$have_exa_h" = xyes; then
AC_DEFINE(USE_EXA, 1, [Build support for Exa])
fi
fi
+
+AC_CHECK_DECL(xf86XVFillKeyHelperDrawable,
+ [AC_DEFINE(HAVE_XV_DRAWABLE_HELPER, 1, [Have xf86XVFillKeyHelperDrawable prototype])],
+ [],
+ [#include <xf86xv.h>])
+
CPPFLAGS="$SAVE_CPPFLAGS"
AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index b03f8de..d4e1f0a 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -2696,6 +2696,17 @@ RADEONDisplayVideo(
}
+static void
+RADEONFillKeyHelper(DrawablePtr pDraw, CARD32 colorKey, RegionPtr clipBoxes)
+{
+#if HAVE_XV_DRAWABLE_HELPER
+ xf86XVFillKeyHelperDrawable(pDraw, colorKey, clipBoxes);
+#else
+ xf86XVFillKeyHelper(pDraw->pScreen, colorKey, clipBoxes);
+#endif
+}
+
+
static int
RADEONPutImage(
ScrnInfoPtr pScrn,
@@ -2870,7 +2881,7 @@ RADEONPutImage(
REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
/* draw these */
if(pPriv->autopaint_colorkey)
- xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
+ RADEONFillKeyHelper(pDraw, pPriv->colorKey, clipBoxes);
}
RADEONDisplayVideo(pScrn, pPriv, id, offset, offset, offset, offset, width, height, dstPitch,
@@ -3416,7 +3427,7 @@ RADEONPutVideo(
REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
/* draw these */
if(pPriv->autopaint_colorkey)
- xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
+ RADEONFillKeyHelper(pDraw, pPriv->colorKey, clipBoxes);
}
RADEONDisplayVideo(pScrn, pPriv, id, offset1+top*srcPitch, offset2+top*srcPitch, offset3+top*srcPitch, offset4+top*srcPitch, width, height, dstPitch*mult/2,