diff options
author | Adam Jackson <ajax@redhat.com> | 2011-01-17 19:05:10 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-01-17 19:10:13 -0500 |
commit | 2063aabe34d2bf658788ef58c7f39b4188844eba (patch) | |
tree | f1e79212cab9823ccadd1c9b170f2d59f785748b | |
parent | 60f74566ac0b8e2514da403d910cb8b6fbcedb5d (diff) |
dmx: Remove shadowfb supportscreen-gc-funcs
This has been documented as deprecated since it was first merged, time
to say goodbye.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | hw/dmx/Makefile.am | 2 | ||||
-rw-r--r-- | hw/dmx/Xdmx.man | 10 | ||||
-rw-r--r-- | hw/dmx/dmx.h | 9 | ||||
-rw-r--r-- | hw/dmx/dmxinit.c | 16 | ||||
-rw-r--r-- | hw/dmx/dmxpict.c | 6 | ||||
-rw-r--r-- | hw/dmx/dmxscrinit.c | 260 | ||||
-rw-r--r-- | hw/dmx/dmxshadow.c | 71 | ||||
-rw-r--r-- | hw/dmx/dmxshadow.h | 46 | ||||
-rw-r--r-- | hw/dmx/doc/dmx.xml | 61 | ||||
-rw-r--r-- | hw/dmx/input/dmxcommon.c | 7 |
10 files changed, 112 insertions, 376 deletions
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 2a87c3966..cf3c58816 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -56,8 +56,6 @@ Xdmx_SOURCES = dmx.c \ dmxprop.h \ dmxscrinit.c \ dmxscrinit.h \ - dmxshadow.c \ - dmxshadow.h \ dmxstat.c \ dmxstat.h \ dmxsync.c \ diff --git a/hw/dmx/Xdmx.man b/hw/dmx/Xdmx.man index 9c8bdea00..8cf806928 100644 --- a/hw/dmx/Xdmx.man +++ b/hw/dmx/Xdmx.man @@ -177,16 +177,6 @@ will switch to another VC in local (raw) mode. .RE .sp .TP 8 -.BI "-shadowfb" -This option turns on (legacy) support for the shadow frame buffer. -.sp -.TP 8 -.BI "-noshadowfb" -This option turns off (legacy) support for the shadow frame buffer. -Note that this option has been deprecated and will be removed in the -next release. -.sp -.TP 8 .BI "-nomulticursor" This option turns off support for displaying multiple cursors on overlapped back-end displays. This option is available for testing and diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index f7d894396..2f5b071b7 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -145,12 +145,6 @@ typedef struct _DMXScreenInfo { int rootXOrigin; /**< Global X origin of "root" window */ int rootYOrigin; /**< Global Y origin of "root" window */ - /*---------- Shadow framebuffer information ----------*/ - - void *shadow; /**< Shadow framebuffer data (if enabled) */ - XlibGC shadowGC; /**< Default GC used by shadow FB code */ - XImage *shadowFBImage; /**< Screen image used by shadow FB code */ - /*---------- Other related information ----------*/ int shared; /**< Non-zero if another Xdmx is running */ @@ -260,9 +254,6 @@ typedef struct _DMXScreenInfo { /* Global variables available to all Xserver/hw/dmx routines. */ extern int dmxNumScreens; /**< Number of dmxScreens */ extern DMXScreenInfo *dmxScreens; /**< List of outputs */ -extern int dmxShadowFB; /**< Non-zero if using - * shadow frame-buffer - * (deprecated) */ extern XErrorEvent dmxLastErrorEvent; /**< Last error that * occurred */ extern Bool dmxErrorOccurred; /**< True if an error diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index 74b358244..dfad71cae 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -78,8 +78,6 @@ DMXScreenInfo *dmxScreens; int dmxNumInputs; DMXInputInfo *dmxInputs; -int dmxShadowFB = FALSE; - XErrorEvent dmxLastErrorEvent; Bool dmxErrorOccurred = FALSE; @@ -791,9 +789,6 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) /* Initialized things that need timer hooks */ dmxStatInit(); dmxSyncInit(); /* Calls RegisterBlockAndWakeupHandlers */ - - dmxLog(dmxInfo, "Shadow framebuffer support %s\n", - dmxShadowFB ? "enabled" : "disabled"); } /* RATS: Assuming the fp string (which comes from the command-line argv @@ -875,18 +870,12 @@ int ddxProcessArgument(int argc, char *argv[], int i) } else if (!strcmp(argv[i], "-xinputfrom") || !strcmp(argv[i],"-xinput")) { if (++i < argc) dmxConfigStoreXInput(argv[i]); retval = 2; - } else if (!strcmp(argv[i], "-noshadowfb")) { - dmxLog(dmxWarning, - "-noshadowfb has been deprecated " - "since it is now the default\n"); - dmxShadowFB = FALSE; + } else if (!strcmp(argv[i], "-noshadowfb") || !strcmp(argv[i], "-shadowfb")) { + dmxLog(dmxWarning, "Ignoring shadowfb option\n"); retval = 1; } else if (!strcmp(argv[i], "-nomulticursor")) { dmxCursorNoMulti(); retval = 1; - } else if (!strcmp(argv[i], "-shadowfb")) { - dmxShadowFB = TRUE; - retval = 1; } else if (!strcmp(argv[i], "-configfile")) { if (++i < argc) dmxConfigStoreFile(argv[i]); retval = 2; @@ -970,7 +959,6 @@ void ddxUseMsg(void) ErrorF("-display string Specify the back-end display(s)\n"); ErrorF("-input string Specify input source for core device\n"); ErrorF("-xinput string Specify input source for XInput device\n"); - ErrorF("-shadowfb Enable shadow frame buffer\n"); ErrorF("-configfile file Read from a configuration file\n"); ErrorF("-config config Select a specific configuration\n"); ErrorF("-nomulticursor Turn of multiple cursor support\n"); diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c index bbde8fde1..6b6e3f2fc 100644 --- a/hw/dmx/dmxpict.c +++ b/hw/dmx/dmxpict.c @@ -132,16 +132,12 @@ void dmxResetRender(void) } /** Initialize the RENDER extension, allocate the picture privates and - * wrap mi function hooks. If the shadow frame buffer is used, then - * call the appropriate fb initialization function. */ + * wrap mi function hooks. */ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) { DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; PictureScreenPtr ps; - /* The shadow framebuffer only relies on FB to be initialized */ - if (dmxShadowFB) return fbPictureInit(pScreen, formats, nformats); - if (!miPictureInit(pScreen, formats, nformats)) return FALSE; diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 3b6295dd6..adc4c5efd 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -41,7 +41,6 @@ #include "dmx.h" #include "dmxsync.h" -#include "dmxshadow.h" #include "dmxscrinit.h" #include "dmxcursor.h" #include "dmxgc.h" @@ -159,41 +158,18 @@ void dmxBEScreenInit(int idx, ScreenPtr pScreen) XMapWindow(dmxScreen->beDisplay, dmxScreen->scrnWin); - if (dmxShadowFB) { - mask = (GCFunction - | GCPlaneMask - | GCClipMask); - gcvals.function = GXcopy; - gcvals.plane_mask = AllPlanes; - gcvals.clip_mask = None; - - dmxScreen->shadowGC = XCreateGC(dmxScreen->beDisplay, - dmxScreen->scrnWin, - mask, &gcvals); - - dmxScreen->shadowFBImage = - XCreateImage(dmxScreen->beDisplay, - dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual, - dmxScreen->beDepth, - ZPixmap, - 0, - (char *)dmxScreen->shadow, - dmxScreen->scrnWidth, dmxScreen->scrnHeight, - dmxScreen->beBPP, - PixmapBytePad(dmxScreen->scrnWidth, - dmxScreen->beBPP)); - } else { - /* Create default drawables (used during GC creation) */ - for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) - for (j = 0; j < dmxScreen->beNumDepths; j++) - if ((dmxScreen->bePixmapFormats[i].depth == 1) || - (dmxScreen->bePixmapFormats[i].depth == - dmxScreen->beDepths[j])) { - dmxScreen->scrnDefDrawables[i] = (Drawable) - XCreatePixmap(dmxScreen->beDisplay, dmxScreen->scrnWin, - 1, 1, dmxScreen->bePixmapFormats[i].depth); - break; - } + /* Create default drawables (used during GC creation) */ + for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) { + for (j = 0; j < dmxScreen->beNumDepths; j++) { + if ((dmxScreen->bePixmapFormats[i].depth == 1) || + (dmxScreen->bePixmapFormats[i].depth == + dmxScreen->beDepths[j])) { + dmxScreen->scrnDefDrawables[i] = (Drawable) + XCreatePixmap(dmxScreen->beDisplay, dmxScreen->scrnWin, + 1, 1, dmxScreen->bePixmapFormats[i].depth); + break; + } + } } } @@ -219,15 +195,9 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) dmxGeneration = serverGeneration; } - if (dmxShadowFB) { - dmxScreen->shadow = shadowAlloc(dmxScreen->scrnWidth, - dmxScreen->scrnHeight, - dmxScreen->beBPP); - } else { - if (!dmxInitGC(pScreen)) return FALSE; - if (!dmxInitWindow(pScreen)) return FALSE; - if (!dmxInitPixmap(pScreen)) return FALSE; - } + if (!dmxInitGC(pScreen)) return FALSE; + if (!dmxInitWindow(pScreen)) return FALSE; + if (!dmxInitPixmap(pScreen)) return FALSE; /* * Initalise the visual types. miSetVisualTypesAndMasks() requires @@ -266,8 +236,7 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) redMask, greenMask, blueMask); } - fbScreenInit(pScreen, - dmxShadowFB ? dmxScreen->shadow : NULL, + fbScreenInit(pScreen, NULL, dmxScreen->scrnWidth, dmxScreen->scrnHeight, dmxScreen->beXDPI, @@ -280,22 +249,15 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) pScreen->GetWindowPixmap = NULL; pScreen->SetWindowPixmap = NULL; - if (dmxShadowFB && !shadowInit(pScreen, dmxShadowUpdateProc, NULL)) - return FALSE; + MAXSCREENSALLOC(dmxCursorGeneration); + if (dmxCursorGeneration[idx] != serverGeneration) { + if (!(miPointerInitialize(pScreen, + &dmxPointerSpriteFuncs, + &dmxPointerCursorFuncs, + FALSE))) + return FALSE; - if (dmxShadowFB) { - miDCInitialize(pScreen, &dmxPointerCursorFuncs); - } else { - MAXSCREENSALLOC(dmxCursorGeneration); - if (dmxCursorGeneration[idx] != serverGeneration) { - if (!(miPointerInitialize(pScreen, - &dmxPointerSpriteFuncs, - &dmxPointerCursorFuncs, - FALSE))) - return FALSE; - - dmxCursorGeneration[idx] = serverGeneration; - } + dmxCursorGeneration[idx] = serverGeneration; } DMX_WRAP(CloseScreen, dmxCloseScreen, dmxScreen, pScreen); @@ -303,53 +265,51 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) dmxBEScreenInit(idx, pScreen); - if (!dmxShadowFB) { - /* Wrap GC functions */ - DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen); - DMX_WRAP(ValidateGC, dmxValidateGC, dmxScreen, pScreen); - DMX_WRAP(CopyGC, dmxCopyGC, dmxScreen, pScreen); - DMX_WRAP(ChangeGC, dmxChangeGC, dmxScreen, pScreen); - DMX_WRAP(DestroyGC, dmxDestroyGC, dmxScreen, pScreen); - - /* Wrap Window functions */ - DMX_WRAP(CreateWindow, dmxCreateWindow, dmxScreen, pScreen); - DMX_WRAP(DestroyWindow, dmxDestroyWindow, dmxScreen, pScreen); - DMX_WRAP(PositionWindow, dmxPositionWindow, dmxScreen, pScreen); - DMX_WRAP(ChangeWindowAttributes, dmxChangeWindowAttributes, dmxScreen, - pScreen); - DMX_WRAP(RealizeWindow, dmxRealizeWindow, dmxScreen, pScreen); - DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen); - DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen); - DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); - DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen); - - DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen); - DMX_WRAP(ReparentWindow, dmxReparentWindow, dmxScreen, pScreen); - - DMX_WRAP(ChangeBorderWidth, dmxChangeBorderWidth, dmxScreen, pScreen); - - /* Wrap Image functions */ - DMX_WRAP(GetImage, dmxGetImage, dmxScreen, pScreen); - DMX_WRAP(GetSpans, dmxGetSpans, dmxScreen, pScreen); - - /* Wrap Pixmap functions */ - DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen); - DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen); - DMX_WRAP(BitmapToRegion, dmxBitmapToRegion, dmxScreen, pScreen); - - /* Wrap Font functions */ - DMX_WRAP(RealizeFont, dmxRealizeFont, dmxScreen, pScreen); - DMX_WRAP(UnrealizeFont, dmxUnrealizeFont, dmxScreen, pScreen); - - /* Wrap Colormap functions */ - DMX_WRAP(CreateColormap, dmxCreateColormap, dmxScreen, pScreen); - DMX_WRAP(DestroyColormap, dmxDestroyColormap, dmxScreen, pScreen); - DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen); - DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen); - - /* Wrap Shape functions */ - DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen); - } + /* Wrap GC functions */ + DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen); + DMX_WRAP(ValidateGC, dmxValidateGC, dmxScreen, pScreen); + DMX_WRAP(CopyGC, dmxCopyGC, dmxScreen, pScreen); + DMX_WRAP(ChangeGC, dmxChangeGC, dmxScreen, pScreen); + DMX_WRAP(DestroyGC, dmxDestroyGC, dmxScreen, pScreen); + + /* Wrap Window functions */ + DMX_WRAP(CreateWindow, dmxCreateWindow, dmxScreen, pScreen); + DMX_WRAP(DestroyWindow, dmxDestroyWindow, dmxScreen, pScreen); + DMX_WRAP(PositionWindow, dmxPositionWindow, dmxScreen, pScreen); + DMX_WRAP(ChangeWindowAttributes, dmxChangeWindowAttributes, dmxScreen, + pScreen); + DMX_WRAP(RealizeWindow, dmxRealizeWindow, dmxScreen, pScreen); + DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen); + DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen); + DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen); + DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen); + + DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen); + DMX_WRAP(ReparentWindow, dmxReparentWindow, dmxScreen, pScreen); + + DMX_WRAP(ChangeBorderWidth, dmxChangeBorderWidth, dmxScreen, pScreen); + + /* Wrap Image functions */ + DMX_WRAP(GetImage, dmxGetImage, dmxScreen, pScreen); + DMX_WRAP(GetSpans, dmxGetSpans, dmxScreen, pScreen); + + /* Wrap Pixmap functions */ + DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen); + DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen); + DMX_WRAP(BitmapToRegion, dmxBitmapToRegion, dmxScreen, pScreen); + + /* Wrap Font functions */ + DMX_WRAP(RealizeFont, dmxRealizeFont, dmxScreen, pScreen); + DMX_WRAP(UnrealizeFont, dmxUnrealizeFont, dmxScreen, pScreen); + + /* Wrap Colormap functions */ + DMX_WRAP(CreateColormap, dmxCreateColormap, dmxScreen, pScreen); + DMX_WRAP(DestroyColormap, dmxDestroyColormap, dmxScreen, pScreen); + DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen); + DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen); + + /* Wrap Shape functions */ + DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen); if (!dmxCreateDefColormap(pScreen)) return FALSE; @@ -375,21 +335,13 @@ void dmxBECloseScreen(ScreenPtr pScreen) XDestroyWindow(dmxScreen->beDisplay, dmxScreen->scrnWin); dmxScreen->scrnWin = (Window)0; - if (dmxShadowFB) { - /* Free the shadow GC and image assocated with the back-end server */ - XFreeGC(dmxScreen->beDisplay, dmxScreen->shadowGC); - dmxScreen->shadowGC = NULL; - XFree(dmxScreen->shadowFBImage); - dmxScreen->shadowFBImage = NULL; - } else { - /* Free the default drawables */ - for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) { - if (dmxScreen->scrnDefDrawables[i]) { - XFreePixmap(dmxScreen->beDisplay, - dmxScreen->scrnDefDrawables[i]); - dmxScreen->scrnDefDrawables[i] = (Drawable)0; - } - } + /* Free the default drawables */ + for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) { + if (dmxScreen->scrnDefDrawables[i]) { + XFreePixmap(dmxScreen->beDisplay, + dmxScreen->scrnDefDrawables[i]); + dmxScreen->scrnDefDrawables[i] = (Drawable)0; + } } /* Free resources allocated during initialization (in dmxinit.c) */ @@ -435,47 +387,41 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen) dmxResetFonts(); } - if (dmxShadowFB) { - /* Free the shadow framebuffer */ - free(dmxScreen->shadow); - } else { + /* Unwrap Shape functions */ + DMX_UNWRAP(SetShape, dmxScreen, pScreen); - /* Unwrap Shape functions */ - DMX_UNWRAP(SetShape, dmxScreen, pScreen); + /* Unwrap the pScreen functions */ + DMX_UNWRAP(CreateGC, dmxScreen, pScreen); - /* Unwrap the pScreen functions */ - DMX_UNWRAP(CreateGC, dmxScreen, pScreen); + DMX_UNWRAP(CreateWindow, dmxScreen, pScreen); + DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen); + DMX_UNWRAP(PositionWindow, dmxScreen, pScreen); + DMX_UNWRAP(ChangeWindowAttributes, dmxScreen, pScreen); + DMX_UNWRAP(RealizeWindow, dmxScreen, pScreen); + DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen); + DMX_UNWRAP(RestackWindow, dmxScreen, pScreen); + DMX_UNWRAP(WindowExposures, dmxScreen, pScreen); + DMX_UNWRAP(CopyWindow, dmxScreen, pScreen); - DMX_UNWRAP(CreateWindow, dmxScreen, pScreen); - DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen); - DMX_UNWRAP(PositionWindow, dmxScreen, pScreen); - DMX_UNWRAP(ChangeWindowAttributes, dmxScreen, pScreen); - DMX_UNWRAP(RealizeWindow, dmxScreen, pScreen); - DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen); - DMX_UNWRAP(RestackWindow, dmxScreen, pScreen); - DMX_UNWRAP(WindowExposures, dmxScreen, pScreen); - DMX_UNWRAP(CopyWindow, dmxScreen, pScreen); + DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen); + DMX_UNWRAP(ReparentWindow, dmxScreen, pScreen); - DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen); - DMX_UNWRAP(ReparentWindow, dmxScreen, pScreen); + DMX_UNWRAP(ChangeBorderWidth, dmxScreen, pScreen); - DMX_UNWRAP(ChangeBorderWidth, dmxScreen, pScreen); + DMX_UNWRAP(GetImage, dmxScreen, pScreen); + DMX_UNWRAP(GetSpans, dmxScreen, pScreen); - DMX_UNWRAP(GetImage, dmxScreen, pScreen); - DMX_UNWRAP(GetSpans, dmxScreen, pScreen); + DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen); + DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen); + DMX_UNWRAP(BitmapToRegion, dmxScreen, pScreen); - DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen); - DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen); - DMX_UNWRAP(BitmapToRegion, dmxScreen, pScreen); + DMX_UNWRAP(RealizeFont, dmxScreen, pScreen); + DMX_UNWRAP(UnrealizeFont, dmxScreen, pScreen); - DMX_UNWRAP(RealizeFont, dmxScreen, pScreen); - DMX_UNWRAP(UnrealizeFont, dmxScreen, pScreen); - - DMX_UNWRAP(CreateColormap, dmxScreen, pScreen); - DMX_UNWRAP(DestroyColormap, dmxScreen, pScreen); - DMX_UNWRAP(InstallColormap, dmxScreen, pScreen); - DMX_UNWRAP(StoreColors, dmxScreen, pScreen); - } + DMX_UNWRAP(CreateColormap, dmxScreen, pScreen); + DMX_UNWRAP(DestroyColormap, dmxScreen, pScreen); + DMX_UNWRAP(InstallColormap, dmxScreen, pScreen); + DMX_UNWRAP(StoreColors, dmxScreen, pScreen); DMX_UNWRAP(SaveScreen, dmxScreen, pScreen); diff --git a/hw/dmx/dmxshadow.c b/hw/dmx/dmxshadow.c deleted file mode 100644 index a62eb5c52..000000000 --- a/hw/dmx/dmxshadow.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2001 Red Hat Inc., Durham, North Carolina. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * Authors: - * Kevin E. Martin <kem@redhat.com> - * David H. Dawes <dawes@xfree86.org> - * - */ - -#ifdef HAVE_DMX_CONFIG_H -#include <dmx-config.h> -#endif - -#include "dmx.h" -#include "dmxsync.h" -#include "dmxshadow.h" - -/** \file - * This file provides support for the shadow frame buffer. */ - -/** Update the screen from the shadow frame buffer. */ -void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf) -{ - RegionPtr damage = &pBuf->damage; - int nbox = RegionNumRects(damage); - BoxPtr pbox = RegionRects(damage); - DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; - - if (!dmxScreen->beDisplay) - return; - - while (nbox--) { - XPutImage(dmxScreen->beDisplay, - dmxScreen->scrnWin, - dmxScreen->shadowGC, - dmxScreen->shadowFBImage, - pbox->x1, pbox->y1, - pbox->x1, pbox->y1, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); - - pbox++; - } - - dmxSync(dmxScreen, FALSE); -} diff --git a/hw/dmx/dmxshadow.h b/hw/dmx/dmxshadow.h deleted file mode 100644 index cafe87900..000000000 --- a/hw/dmx/dmxshadow.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2001 Red Hat Inc., Durham, North Carolina. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * Authors: - * Kevin E. Martin <kem@redhat.com> - * David H. Dawes <dawes@xfree86.org> - * - */ - -/** \file - * Interface for shadow framebuffer support. \see dmxshadow.c */ - -#ifndef DMXSHADOW_H -#define DMXSHADOW_H - -#include "shadow.h" -#include "scrnintstr.h" - -extern void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf); - -#endif /* DMXSHADOW_H */ diff --git a/hw/dmx/doc/dmx.xml b/hw/dmx/doc/dmx.xml index 8dbb7d86f..ddb5f7b7c 100644 --- a/hw/dmx/doc/dmx.xml +++ b/hw/dmx/doc/dmx.xml @@ -13,7 +13,7 @@ <author><firstname>David H.</firstname><surname>Dawes</surname></author> <author><firstname>Rickard E.</firstname><surname>Faith</surname></author> </authorgroup> - <pubdate>29 June 2004 (created 25 July 2001)</pubdate> + <pubdate>17 January 2011 (created 25 July 2001)</pubdate> <abstract><para> This document covers the motivation, background, design, and implementation of the distributed multihead X (DMX) system. It @@ -21,7 +21,7 @@ implementation details of the DMX system. As the project progresses, this document will be continually updated to reflect the changes in the code and/or design. <emphasis remap="it">Copyright 2001 by VA - Linux Systems, Inc., Fremont, California. Copyright 2001-2004 + Linux Systems, Inc., Fremont, California. Copyright 2001-2011 by Red Hat, Inc., Raleigh, North Carolina</emphasis> </para></abstract> </articleinfo> @@ -435,7 +435,7 @@ requests are handled in the DMX system: implementation. </para> - <para>The final DMX implementation defaults to this mechanism, but also + <para>The final DMX implementation uses this mechanism and no longer supports the shadow framebuffer mechanism. Several optimizations were implemented to eliminate the drawbacks of the default mechanism. These optimizations are described the section below and @@ -446,7 +446,9 @@ requests are handled in the DMX system: </orderedlist> </para> -<para>Status: Both the shadow framebuffer and Xnest-style code is complete. +<para>Status: Both the shadow framebuffer and Xnest-style code have been + completed. The shadow framebuffer code has been deprecated and + removed. <!-- May 2002 --> </para> @@ -1383,57 +1385,6 @@ to any client that requests those events. </para> </sect3> -<sect3> -<title>Shadow framebuffer</title> - -<para>The most common type of framebuffer is a linear array memory that -maps to the video memory on the graphics device. However, accessing -that video memory over an I/O bus (e.g., ISA or PCI) can be slow. The -shadow framebuffer layer allows the developer to keep the entire -framebuffer in main memory and copy it back to video memory at regular -intervals. It also has been extended to handle planar video memory and -rotated framebuffers. -</para> - -<para>There are two main entry points to the shadow framebuffer code: - -<variablelist> -<varlistentry> -<term>shadowAlloc(width, height, bpp)</term> -<listitem> -<para>This function allocates the in -memory copy of the framebuffer of size width*height*bpp. It returns a -pointer to that memory, which will be used by the framebuffer -ScreenInit() code during the screen's initialization. -</para></listitem></varlistentry> - -<varlistentry> -<term>shadowInit(pScreen, updateProc, windowProc)</term> -<listitem> -<para>This function -initializes the shadow framebuffer layer. It wraps several screen -drawing functions, and registers a block handler that will update the -screen. The updateProc is a function that will copy the damaged regions -to the screen, and the windowProc is a function that is used when the -entire linear video memory range cannot be accessed simultaneously so -that only a window into that memory is available (e.g., when using the -VGA aperture). -</para></listitem></varlistentry> -</variablelist> -</para> - -<para>The shadow framebuffer code keeps track of the damaged area of each -screen by calculating the bounding box of all drawing operations that -have occurred since the last screen update. Then, when the block handler -is next called, only the damaged portion of the screen is updated. -</para> - -<para>Note that since the shadow framebuffer is kept in main memory, all -drawing operations are performed by the CPU and, thus, no accelerated -hardware drawing operations are possible. -</para> - -</sect3> </sect2> <sect2> diff --git a/hw/dmx/input/dmxcommon.c b/hw/dmx/input/dmxcommon.c index c665dad90..4ece517fb 100644 --- a/hw/dmx/input/dmxcommon.c +++ b/hw/dmx/input/dmxcommon.c @@ -482,13 +482,6 @@ int dmxCommonMouOn(DevicePtr pDev) GETDMXINPUTFROMPRIV; priv->eventMask |= DMX_POINTER_EVENT_MASK; - if (dmxShadowFB) { - XWarpPointer(priv->display, priv->window, priv->window, - 0, 0, 0, 0, - priv->initPointerX, - priv->initPointerY); - dmxSync(&dmxScreens[dmxInput->scrnIdx], TRUE); - } if (!priv->be) { XSelectInput(priv->display, priv->window, priv->eventMask); AddEnabledDevice(XConnectionNumber(priv->display)); |