From f83960f3edb8a8be12ce9dc46a9b9a292de816d6 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 29 Apr 2008 10:32:14 -0700 Subject: Use new xf86RotateFreeShadow function to clean up shadow buffers. This simply moves code from the driver up into the X server; use it where available. (cherry picked from commit fff17b9d1b58cb53032d153094826dd306836d59) --- configure.ac | 12 ++++++++++++ src/i830_driver.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/configure.ac b/configure.ac index da479dc0..23939c9d 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,18 @@ fi AC_SUBST([XMODES_CFLAGS]) +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" + +AC_CHECK_DECL(xf86RotateFreeShadow, + [AC_DEFINE(HAVE_FREE_SHADOW, 1, [have new FreeShadow API])], + [], + [#include + #include + #include ]) + +CPPFLAGS="$SAVE_CPPFLAGS" + dnl Use lots of warning flags with GCC WARN_CFLAGS="" diff --git a/src/i830_driver.c b/src/i830_driver.c index f4046779..cc3d02df 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3132,7 +3132,9 @@ I830LeaveVT(int scrnIndex, int flags) ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; I830Ptr pI830 = I830PTR(pScrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); +#ifndef HAVE_FREE_SHADOW int o; +#endif DPRINTF(PFX, "Leave VT\n"); @@ -3160,6 +3162,7 @@ I830LeaveVT(int scrnIndex, int flags) } #endif +#ifndef HAVE_FREE_SHADOW for (o = 0; o < config->num_crtc; o++) { xf86CrtcPtr crtc = config->crtc[o]; @@ -3170,6 +3173,9 @@ I830LeaveVT(int scrnIndex, int flags) crtc->rotatedData = NULL; } } +#else + xf86RotateFreeShadow(pScrn); +#endif xf86_hide_cursors (pScrn); -- cgit v1.2.3