From e6b6506a0e77e1198d6a83eecddf342b746f31f4 Mon Sep 17 00:00:00 2001 From: Alex VillacĂ­s Lasso Date: Thu, 6 Nov 2008 14:11:49 -0500 Subject: Bug #18378: Use xfVillKeyHelperDrawable if available. --- configure.ac | 4 ++++ src/savage_video.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3