Commit c4c4676e authored by Adam Jackson's avatar Adam Jackson 🎧

dix: Remove the backing store leftovers

Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 48bc8d0d
......@@ -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 {
......
......@@ -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
......
......@@ -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;
......
......@@ -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"
......
......@@ -1241,8 +1241,6 @@ typedef struct _XAAInfoRec {
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
CopyWindowProcPtr CopyWindow;
BackingStoreSaveAreasProcPtr SaveAreas;
BackingStoreRestoreAreasProcPtr RestoreAreas;
unsigned int offscreenDepths;
Bool offscreenDepthsInitialized;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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");
......
if XORG
sdk_HEADERS = \
XIstubs.h \
bstore.h \
bstorestr.h \
callback.h \
closestr.h \
closure.h \
......
/*
* 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@xfree86.org)
*/
#ifndef _BSTORE_H_
#define _BSTORE_H_
#include "bstorestr.h"
#endif /* _BSTORE_H_ */
/*
* 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@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_ */
......@@ -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;
......
......@@ -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 \
......
......@@ -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;
}
......@@ -18,8 +18,6 @@
#include "screenint.h"
extern _X_EXPORT void miInitializeBackingStore(
ScreenPtr /*pScreen*/
);
#define miInitializeBackingStore(x) do {} while (0)
#endif /* _MIBSTORE_H */
/*
* 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;
......@@ -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);
......
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment