diff options
-rw-r--r-- | uxa/uxa-accel.c | 80 | ||||
-rw-r--r-- | uxa/uxa-priv.h | 31 | ||||
-rw-r--r-- | uxa/uxa.c | 8 |
3 files changed, 0 insertions, 119 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index 2b43343c..19d1ed11 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -359,92 +359,12 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, return TRUE; } -#ifdef MITSHM - -#include "xorgVersion.h" - -static Bool -uxa_do_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, - unsigned int format, int w, int h, int sx, int sy, int sw, - int sh, int dx, int dy, char *data) -{ - int src_stride = PixmapBytePad(w, depth); - - if (uxa_do_put_image - (pDrawable, pGC, depth, dx, dy, sw, sh, format, - data + sy * src_stride + sx * BitsPerPixel(depth) / 8, src_stride)) - return TRUE; - - if (format == ZPixmap) { - PixmapPtr pPixmap; - - pPixmap = - GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth, - BitsPerPixel(depth), PixmapBytePad(w, - depth), - (pointer) data); - if (!pPixmap) - return FALSE; - - if (!uxa_prepare_access(pDrawable, UXA_ACCESS_RW)) { - FreeScratchPixmapHeader(pPixmap); - return FALSE; - } - - fbCopyArea((DrawablePtr) pPixmap, pDrawable, pGC, sx, sy, sw, - sh, dx, dy); - uxa_finish_access(pDrawable); - - FreeScratchPixmapHeader(pPixmap); - - return TRUE; - } - - return FALSE; -} - -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,5,99,0,0) - -/* The actual ShmPutImage isn't wrapped by the damage layer, so we need to - * inform any interested parties of the damage incurred to the drawable. - * - * We also need to set the pending damage to ensure correct migration in all - * cases. - */ -void -uxa_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, - unsigned int format, int w, int h, int sx, int sy, int sw, - int sh, int dx, int dy, char *data) -{ - if (!uxa_do_shm_put_image - (pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, - data)) { - if (!uxa_prepare_access(pDrawable, UXA_ACCESS_RW)) - return; - fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, - sh, dx, dy, data); - uxa_finish_access(pDrawable); - } -} -#else -#define uxa_shm_put_image NULL -#endif - -ShmFuncs uxa_shm_funcs = { NULL, uxa_shm_put_image }; - -#endif - static void uxa_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { -#ifdef MITSHM - if (!uxa_do_shm_put_image - (pDrawable, pGC, depth, format, w, h, 0, 0, w, h, x, y, bits)) -#else if (!uxa_do_put_image(pDrawable, pGC, depth, x, y, w, h, format, bits, PixmapBytePad(w, pDrawable->depth))) -#endif uxa_check_put_image(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); } diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h index 75089657..4b988f4e 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -41,14 +41,6 @@ #include <X11/X.h> #define NEED_EVENTS #include <X11/Xproto.h> -#ifdef MITSHM -#ifdef HAVE_XEXTPROTO_71 -#include <X11/extensions/shm.h> -#else -#define _XSHM_SERVER_ -#include <X11/extensions/shmstr.h> -#endif -#endif #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" @@ -293,11 +285,6 @@ Bool uxa_fill_region_tiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu); -void -uxa_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, - unsigned int format, int w, int h, int sx, int sy, int sw, - int sh, int dx, int dy, char *data); - void uxa_paint_window(WindowPtr pWin, RegionPtr pRegion, int what); void @@ -306,24 +293,6 @@ uxa_get_image(DrawablePtr pDrawable, int x, int y, int w, int h, extern const GCOps uxa_ops; -#ifdef MITSHM -/* XXX these come from shmint.h, which isn't exported by the server */ - -#ifdef HAVE_XEXTPROTO_71 -#include "shmint.h" -#else - -void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); - -void ShmSetPixmapFormat(ScreenPtr pScreen, int format); - -void fbShmPutImage(XSHM_PUT_IMAGE_ARGS); -#endif - -extern ShmFuncs uxa_shm_funcs; - -#endif - #ifdef RENDER /* XXX these are in fbpict.h, which is not installed */ @@ -544,14 +544,6 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver) } #endif -#ifdef MITSHM - /* Re-register with the MI funcs, which don't allow shared pixmaps. - * Shared pixmaps are almost always a performance loss for us, but this - * still allows for SHM PutImage. - */ - ShmRegisterFuncs(screen, &uxa_shm_funcs); -#endif - LogMessage(X_INFO, "UXA(%d): Driver registered support for the following" " operations:\n", screen->myNum); |