summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-10-15 17:05:02 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-10-15 17:05:02 +0200
commit2933140b5f1f8a6e270460d8918a14943bd0f174 (patch)
treedb0ace6b7daff8dada9310d9ab6d3ba348dba76f
parent4edbfb9eb952f9b3f5f597749192c17baf15cdce (diff)
radeon: Use xf86XVFillKeyHelperDrawable() when available.
-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 e52bcd97..45994291 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 b03f8de4..d4e1f0ac 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,