diff --git a/exa/exa.h b/exa/exa.h index 1ff0518..998e497 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -39,7 +39,7 @@ #include "fb.h" #define EXA_VERSION_MAJOR 2 -#define EXA_VERSION_MINOR 4 +#define EXA_VERSION_MINOR 5 #define EXA_VERSION_RELEASE 0 typedef struct _ExaOffscreenArea ExaOffscreenArea; @@ -767,6 +767,9 @@ ExaOffscreenArea * exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area); void +exaOffscreenUpdateBase(ScreenPtr pScreen, int new_base); + +void ExaOffscreenMarkUsed (PixmapPtr pPixmap); unsigned long diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c index c666b00..1eabd7a 100644 --- a/exa/exa_offscreen.c +++ b/exa/exa_offscreen.c @@ -256,6 +256,27 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, } /** + * If the offscreen area moves (e.g. during a VT switch), relocate it + * to a new location specified by new_base. + */ +void +exaOffscreenUpdateBase (ScreenPtr pScreen, int new_base) +{ + ExaOffscreenArea *area; + ExaScreenPriv (pScreen); + + DBG_OFFSCREEN (("Validating offscreen memory prior to relocation.\n")); + ExaOffscreenValidate (pScreen); + + /* Update the base address of the offscreen area */ + for (area = pExaScr->info->offScreenAreas; area; area = area->next) + area->base_offset = new_base; + + DBG_OFFSCREEN (("Relocation complete, re-validating\n")); + ExaOffscreenValidate (pScreen); +} + +/** * Ejects all offscreen areas, and uninitializes the offscreen memory manager. */ void