From df68723baae71498de95924c72d4f23fa7fc7fdf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 3 Sep 2012 20:43:48 +0100 Subject: sna: Port prime interfacing Preliminary prime support. Signed-off-by: Chris Wilson --- src/sna/fb/fb.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/sna/fb') diff --git a/src/sna/fb/fb.h b/src/sna/fb/fb.h index 3339236e..215aec99 100644 --- a/src/sna/fb/fb.h +++ b/src/sna/fb/fb.h @@ -28,15 +28,15 @@ #include "config.h" #endif -#include -#include - #include #include #include #include #include +#include +#include + #if HAS_DEBUG_FULL #define DBG(x) ErrorF x #else @@ -288,13 +288,17 @@ typedef struct { unsigned char bpp; /* current drawable bpp */ } FbGCPrivate, *FbGCPrivPtr; +extern DevPrivateKeyRec sna_gc_key; +extern DevPrivateKeyRec sna_window_key; + static inline FbGCPrivate *fb_gc(GCPtr gc) { - return (FbGCPrivate *)gc->devPrivates; + return dixGetPrivateAddr(&gc->devPrivates, &sna_gc_key); } + static inline PixmapPtr fbGetWindowPixmap(WindowPtr window) { - return *(void **)window->devPrivates; + return *(PixmapPtr *)dixGetPrivateAddr(&window->devPrivates, &sna_window_key); } #ifdef ROOTLESS -- cgit v1.2.3