summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex VillacĂ­s Lasso <a_villacis@palosanto.com>2008-11-06 14:11:49 -0500
committerAdam Jackson <ajax@redhat.com>2008-11-06 14:11:49 -0500
commite6b6506a0e77e1198d6a83eecddf342b746f31f4 (patch)
tree04c1c7405d93aa6dff3b49bb38f547ec8858f611
parentde3350e7937240686a90e51243e701b51a7f5249 (diff)
Bug #18378: Use xfVillKeyHelperDrawable if available.
-rw-r--r--configure.ac4
-rw-r--r--src/savage_video.c12
2 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b6d64e4..80c91bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,10 @@ CFLAGS="$XORG_CFLAGS"
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 --git a/src/savage_video.c b/src/savage_video.c
index a68c191..56ced56 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1840,6 +1840,16 @@ SavageDisplayVideo2000(
#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 @@ SavagePutImage(
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);
}