From ffb58f4fa8d86e87f831430b8627f27d85f971a9 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 2 Oct 2007 14:03:39 +1000 Subject: exa: add hooks for drivers to take over pixmap allocation This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe ader. It allocates a 0 sized pixmap using fb and calls the driver routine to do work of allocating the actual memory. ModifyPixmapHeader is mainly required for hooking the screen pixmap which isn't create by normal methods --- exa/exa.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'exa/exa.h') diff --git a/exa/exa.h b/exa/exa.h index c7e39fa64..0eeb1f062 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -702,6 +702,13 @@ typedef struct _ExaDriver { */ int maxPitchBytes; + /* Hooks to allow driver to its own pixmap memory management */ + void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align); + void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv); + Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData); + /** @} */ } ExaDriverRec, *ExaDriverPtr; -- cgit v1.2.3