[PATCH 04/13] dix: Remove the backing store leftovers
Adam Jackson
ajax at redhat.com
Tue Nov 23 11:45:39 PST 2010
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/dmx/dmxscrinit.c | 2 -
hw/kdrive/src/kdrive.c | 6 ---
hw/vfb/InitOutput.c | 7 ---
hw/xfree86/loader/sdksyms.sh | 2 -
hw/xfree86/xaa/xaa.h | 2 -
hw/xnest/Screen.c | 2 -
hw/xquartz/darwin.c | 22 ---------
hw/xwin/winscrinit.c | 7 ---
include/Makefile.am | 2 -
include/bstore.h | 22 ---------
include/bstorestr.h | 55 -----------------------
include/scrnintstr.h | 57 ------------------------
mi/Makefile.am | 2 -
mi/mibstore.c | 6 ---
mi/mibstore.h | 4 +-
mi/mibstorest.h | 91 --------------------------------------
mi/miscrinit.c | 7 ---
mi/mivalidate.h | 3 +-
miext/rootless/rootlessValTree.c | 12 -----
19 files changed, 2 insertions(+), 309 deletions(-)
delete mode 100644 include/bstore.h
delete mode 100644 include/bstorestr.h
delete mode 100644 mi/mibstorest.h
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
index 6d2f2d3..7a94627 100644
--- a/hw/dmx/dmxscrinit.c
+++ b/hw/dmx/dmxscrinit.c
@@ -283,8 +283,6 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
if (dmxShadowFB && !shadowInit(pScreen, dmxShadowUpdateProc, NULL))
return FALSE;
- miInitializeBackingStore(pScreen);
-
if (dmxShadowFB) {
miDCInitialize(pScreen, &dmxPointerCursorFuncs);
} else {
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 06c3661..c688eb0 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -1022,12 +1022,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
fbInitValidateTree (pScreen);
#endif
-#if 0
- pScreen->backingStoreSupport = Always;
- miInitializeBackingStore (pScreen);
-#endif
-
-
/*
* Wrap CloseScreen, the order now is:
* KdCloseScreen
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index e109734..53f82f9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -875,13 +875,6 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
if (!ret) return FALSE;
- miInitializeBackingStore(pScreen);
-
- /*
- * Circumvent the backing store that was just initialised. This amounts
- * to a truely bizarre way of initialising SaveDoomedAreas and friends.
- */
-
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 3804324..1ca6789 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -255,8 +255,6 @@ cat > sdksyms.c << EOF
/* include/Makefile.am */
#include "XIstubs.h"
-#include "bstore.h"
-#include "bstorestr.h"
#include "closestr.h"
#include "closure.h"
#include "colormap.h"
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 2af954f..40b49e5 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -1241,8 +1241,6 @@ typedef struct _XAAInfoRec {
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
CopyWindowProcPtr CopyWindow;
- BackingStoreSaveAreasProcPtr SaveAreas;
- BackingStoreRestoreAreasProcPtr RestoreAreas;
unsigned int offscreenDepths;
Bool offscreenDepthsInitialized;
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 0a6cab6..d0c7fc8 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -239,8 +239,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
defaultVisual, /* root visual */
numVisuals, visuals);
-/* miInitializeBackingStore(pScreen); */
-
pScreen->defColormap = (Colormap) FakeClientID(0);
pScreen->minInstalledCmaps = MINCMAPS;
pScreen->maxInstalledCmaps = MAXCMAPS;
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index fce3b2c..c8eade8 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -868,28 +868,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
}
- if (pWin->backStorage &&
- ((pWin->backingStore == Always) || WasViewable))
- {
- if (!WasViewable)
- pOldClip = &pWin->clipList; /* a convenient empty region */
- bsExposed = (*pScreen->TranslateBackingStore)
- (pWin, 0, 0, pOldClip,
- pWin->drawable.x, pWin->drawable.y);
- if (WasViewable)
- RegionDestroy(pOldClip);
- if (bsExposed)
- {
- RegionPtr valExposed = NullRegion;
-
- if (pWin->valdata)
- valExposed = &pWin->valdata->after.exposed;
- (*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
- if (valExposed)
- RegionEmpty(valExposed);
- RegionDestroy(bsExposed);
- }
- }
if (WasViewable)
{
if (anyMarked)
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 57a0884..21036f4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -394,13 +394,6 @@ winFinishScreenInitFB (int index,
}
#endif
- /*
- * Backing store support should reduce network traffic and increase
- * performance.
- */
- miInitializeBackingStore (pScreen);
-
- /* KDrive does miDCInitialize right after miInitializeBackingStore */
/* Setup the cursor routines */
#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling miDCInitialize ()\n");
diff --git a/include/Makefile.am b/include/Makefile.am
index eb0e3a7..966d215 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,8 +1,6 @@
if XORG
sdk_HEADERS = \
XIstubs.h \
- bstore.h \
- bstorestr.h \
callback.h \
closestr.h \
closure.h \
diff --git a/include/bstore.h b/include/bstore.h
deleted file mode 100644
index 843d6bb..0000000
--- a/include/bstore.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies. The University of
- * California makes no representations about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied
- * warranty.
- */
-
-/*
- * Moved here from mi to allow wrapping of lower level backing store functions.
- * -- 1997.10.27 Marc Aurele La France (tsi at xfree86.org)
- */
-
-#ifndef _BSTORE_H_
-#define _BSTORE_H_
-
-#include "bstorestr.h"
-
-#endif /* _BSTORE_H_ */
diff --git a/include/bstorestr.h b/include/bstorestr.h
deleted file mode 100644
index cf7820b..0000000
--- a/include/bstorestr.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies. The University of
- * California makes no representations about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied
- * warranty.
- */
-
-/*
- * Moved here from mi to allow wrapping of lower level backing store functions.
- * -- 1997.10.27 Marc Aurele La France (tsi at xfree86.org)
- */
-
-#ifndef _BSTORESTR_H_
-#define _BSTORESTR_H_
-
-#include "gc.h"
-#include "pixmap.h"
-#include "region.h"
-#include "window.h"
-
-typedef void (* BackingStoreSaveAreasProcPtr)(
- PixmapPtr /*pBackingPixmap*/,
- RegionPtr /*pObscured*/,
- int /*x*/,
- int /*y*/,
- WindowPtr /*pWin*/);
-
-typedef void (* BackingStoreRestoreAreasProcPtr)(
- PixmapPtr /*pBackingPixmap*/,
- RegionPtr /*pExposed*/,
- int /*x*/,
- int /*y*/,
- WindowPtr /*pWin*/);
-
-typedef void (* BackingStoreSetClipmaskRgnProcPtr)(
- GCPtr /*pBackingGC*/,
- RegionPtr /*pbackingCompositeClip*/);
-
-typedef PixmapPtr (* BackingStoreGetImagePixmapProcPtr)(void);
-
-typedef PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)(void);
-
-typedef struct _BSFuncs {
- BackingStoreSaveAreasProcPtr SaveAreas;
- BackingStoreRestoreAreasProcPtr RestoreAreas;
- BackingStoreSetClipmaskRgnProcPtr SetClipmaskRgn;
- BackingStoreGetImagePixmapProcPtr GetImagePixmap;
- BackingStoreGetSpansPixmapProcPtr GetSpansPixmap;
-} BSFuncRec, *BSFuncPtr;
-
-#endif /* _BSTORESTR_H_ */
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index cd4fb70..813bda1 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -50,7 +50,6 @@ SOFTWARE.
#include "screenint.h"
#include "regionstr.h"
-#include "bstore.h"
#include "colormap.h"
#include "cursor.h"
#include "validate.h"
@@ -213,48 +212,6 @@ typedef PixmapPtr (* CreatePixmapProcPtr)(
typedef Bool (* DestroyPixmapProcPtr)(
PixmapPtr /*pPixmap*/);
-typedef void (* SaveDoomedAreasProcPtr)(
- WindowPtr /*pWindow*/,
- RegionPtr /*prgnSave*/,
- int /*xorg*/,
- int /*yorg*/);
-
-typedef RegionPtr (* RestoreAreasProcPtr)(
- WindowPtr /*pWindow*/,
- RegionPtr /*prgnRestore*/);
-
-typedef void (* ExposeCopyProcPtr)(
- WindowPtr /*pSrc*/,
- DrawablePtr /*pDst*/,
- GCPtr /*pGC*/,
- RegionPtr /*prgnExposed*/,
- int /*srcx*/,
- int /*srcy*/,
- int /*dstx*/,
- int /*dsty*/,
- unsigned long /*plane*/);
-
-typedef RegionPtr (* TranslateBackingStoreProcPtr)(
- WindowPtr /*pWindow*/,
- int /*windx*/,
- int /*windy*/,
- RegionPtr /*oldClip*/,
- int /*oldx*/,
- int /*oldy*/);
-
-typedef RegionPtr (* ClearBackingStoreProcPtr)(
- WindowPtr /*pWindow*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- Bool /*generateExposures*/);
-
-typedef void (* DrawGuaranteeProcPtr)(
- WindowPtr /*pWindow*/,
- GCPtr /*pGC*/,
- int /*guarantee*/);
-
typedef Bool (* RealizeFontProcPtr)(
ScreenPtr /*pScreen*/,
FontPtr /*pFont*/);
@@ -511,20 +468,6 @@ typedef struct _Screen {
CreatePixmapProcPtr CreatePixmap;
DestroyPixmapProcPtr DestroyPixmap;
- /* Backing store procedures */
-
- SaveDoomedAreasProcPtr SaveDoomedAreas;
- RestoreAreasProcPtr RestoreAreas;
- ExposeCopyProcPtr ExposeCopy;
- TranslateBackingStoreProcPtr TranslateBackingStore;
- ClearBackingStoreProcPtr ClearBackingStore;
- DrawGuaranteeProcPtr DrawGuarantee;
- /*
- * A read/write copy of the lower level backing store vector is needed now
- * that the functions can be wrapped.
- */
- BSFuncRec BackingStoreFuncs;
-
/* Font procedures */
RealizeFontProcPtr RealizeFont;
diff --git a/mi/Makefile.am b/mi/Makefile.am
index f6dabda..96ceeaa 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -12,9 +12,7 @@ libmi_la_SOURCES = \
mi.h \
miarc.c \
mibitblt.c \
- mibstore.c \
mibstore.h \
- mibstorest.h \
micmap.c \
micmap.h \
micoord.h \
diff --git a/mi/mibstore.c b/mi/mibstore.c
index 262b494..827b9b2 100644
--- a/mi/mibstore.c
+++ b/mi/mibstore.c
@@ -40,10 +40,4 @@
void
miInitializeBackingStore (ScreenPtr pScreen)
{
- pScreen->SaveDoomedAreas = NULL;
- pScreen->RestoreAreas = NULL;
- pScreen->ExposeCopy = NULL;
- pScreen->TranslateBackingStore = NULL;
- pScreen->ClearBackingStore = NULL;
- pScreen->DrawGuarantee = NULL;
}
diff --git a/mi/mibstore.h b/mi/mibstore.h
index ef7e187..c23caac 100644
--- a/mi/mibstore.h
+++ b/mi/mibstore.h
@@ -18,8 +18,6 @@
#include "screenint.h"
-extern _X_EXPORT void miInitializeBackingStore(
- ScreenPtr /*pScreen*/
-);
+#define miInitializeBackingStore(x) do {} while (0)
#endif /* _MIBSTORE_H */
diff --git a/mi/mibstorest.h b/mi/mibstorest.h
deleted file mode 100644
index ccf4fb7..0000000
--- a/mi/mibstorest.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * mibstorest.h
- *
- * internal structure definitions for mi backing store
- */
-
-
-/*
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "mibstore.h"
-#include "regionstr.h"
-
-/*
- * One of these structures is allocated per GC used with a backing-store
- * drawable.
- */
-
-typedef struct {
- GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
- * set FALSE and the clientClip set to
- * clip output to the valid regions of the
- * backing pixmap. */
- int guarantee; /* GuaranteeNothing, etc. */
- unsigned long serialNumber; /* clientClip computed time */
- unsigned long stateChanges; /* changes in parent gc since last copy */
- GCOps *wrapOps; /* wrapped ops */
- GCFuncs *wrapFuncs; /* wrapped funcs */
-} miBSGCRec, *miBSGCPtr;
-
-/*
- * one of these structures is allocated per Window with backing store
- */
-
-typedef struct {
- PixmapPtr pBackingPixmap; /* Pixmap for saved areas */
- short x; /* origin of pixmap relative to window */
- short y;
- RegionRec SavedRegion; /* Valid area in pBackingPixmap */
- char viewable; /* Tracks pWin->viewable so SavedRegion may
- * be initialized correctly when the window
- * is first mapped */
- char status; /* StatusNoPixmap, etc. */
- char backgroundState; /* background type */
- PixUnion background; /* background pattern */
-} miBSWindowRec, *miBSWindowPtr;
-
-#define StatusNoPixmap 1 /* pixmap has not been created */
-#define StatusVirtual 2 /* pixmap is virtual, tiled with background */
-#define StatusVDirty 3 /* pixmap is virtual, visiblt has contents */
-#define StatusBadAlloc 4 /* pixmap create failed, do not try again */
-#define StatusContents 5 /* pixmap is created, has valid contents */
-
-typedef struct {
- /*
- * screen func wrappers
- */
- CloseScreenProcPtr CloseScreen;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- CreateGCProcPtr CreateGC;
- DestroyWindowProcPtr DestroyWindow;
-} miBSScreenRec, *miBSScreenPtr;
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 661ecb2..33e3737 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -280,13 +280,6 @@ miScreenInit(
pScreen->SetShape = miSetShape;
pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
- pScreen->SaveDoomedAreas = 0;
- pScreen->RestoreAreas = 0;
- pScreen->ExposeCopy = 0;
- pScreen->TranslateBackingStore = 0;
- pScreen->ClearBackingStore = 0;
- pScreen->DrawGuarantee = 0;
-
miSetZeroLineBias(pScreen, DEFAULTZEROLINEBIAS);
return miScreenDevPrivateInit(pScreen, width, pbits);
diff --git a/mi/mivalidate.h b/mi/mivalidate.h
index ef258c0..18700ac 100644
--- a/mi/mivalidate.h
+++ b/mi/mivalidate.h
@@ -40,8 +40,7 @@ typedef union _Validate {
DDXPointRec oldAbsCorner; /* old window position */
RegionPtr borderVisible; /* visible region of border, */
/* non-null when size changes */
- Bool resized; /* unclipped winSize has changed - */
- /* don't call SaveDoomedAreas */
+ Bool resized; /* unclipped winSize has changed */
} before;
struct AfterValidate {
RegionRec exposed; /* exposed regions, absolute pos */
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c
index e2c4ffe..d242600 100644
--- a/miext/rootless/rootlessValTree.c
+++ b/miext/rootless/rootlessValTree.c
@@ -471,18 +471,6 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
universe, &pParent->clipList);
}
- /*
- * One last thing: backing storage. We have to try to save what parts of
- * the window are about to be obscured. We can just subtract the universe
- * from the old clipList and get the areas that were in the old but aren't
- * in the new and, hence, are about to be obscured.
- */
- if (pParent->backStorage && !resized)
- {
- RegionSubtract(exposed, &pParent->clipList, universe);
- (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
- }
-
/* HACK ALERT - copying contents of regions, instead of regions */
{
RegionRec tmp;
--
1.7.3.1
More information about the xorg-devel
mailing list