Skip to content

Commit

Permalink
nxagent: Fake backing store support via Composite extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunweaver committed Nov 20, 2017
1 parent 3b640a0 commit 77bd848
Show file tree
Hide file tree
Showing 37 changed files with 4 additions and 5,221 deletions.
6 changes: 0 additions & 6 deletions nx-X11/programs/Xserver/composite/compinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ compInstallColormap (ColormapPtr pColormap)
pScreen->InstallColormap = compInstallColormap;
}

/* Unsupported by current architecture, drop for now. */
#if 0
static void
compCheckBackingStore(WindowPtr pWin)
{
Expand Down Expand Up @@ -134,7 +132,6 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)

return ret;
}
#endif /* 0 */

static void
compGetImage(DrawablePtr pDrawable,
Expand Down Expand Up @@ -464,11 +461,8 @@ compScreenInit (ScreenPtr pScreen)
cs->InstallColormap = pScreen->InstallColormap;
pScreen->InstallColormap = compInstallColormap;

/* Unsupported by our current architecture, drop for now. */
/*
cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
pScreen->ChangeWindowAttributes = compChangeWindowAttributes;
*/

cs->BlockHandler = NULL;

Expand Down
6 changes: 0 additions & 6 deletions nx-X11/programs/Xserver/dix/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2928,9 +2928,6 @@ UnrealizeTree(
deltaSaveUndersViewable--;
#endif
pChild->viewable = FALSE;
if (pChild->backStorage)
(*pChild->drawable.pScreen->SaveDoomedAreas)(
pChild, &pChild->clipList, 0, 0);
(* MarkUnrealizedWindow)(pChild, pWin, fromConfigure);
pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
}
Expand Down Expand Up @@ -3061,9 +3058,6 @@ UnmapSubwindows(register WindowPtr pWin)
#ifdef DO_SAVE_UNDERS
pChild->DIXsaveUnder = FALSE;
#endif /* DO_SAVE_UNDERS */
if (pChild->backStorage)
(*pScreen->SaveDoomedAreas)(
pChild, &pChild->clipList, 0, 0);
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions nx-X11/programs/Xserver/fb/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ SRCS = $(XFMODSRC) \
fbbits.c \
fbblt.c \
fbbltone.c \
fbbstore.c \
fbcmap.c \
$(RENDERSRC) \
fbcopy.c \
Expand Down Expand Up @@ -66,7 +65,6 @@ OBJS = $(XFMODOBJ) \
fbbits.o \
fbblt.o \
fbbltone.o \
fbbstore.o \
fbcmap.o \
$(RENDEROBJ) \
fbcopy.o \
Expand Down Expand Up @@ -128,7 +126,6 @@ LinkSourceFile(fbarc.c,LinkDirectory)
LinkSourceFile(fbbits.c,LinkDirectory)
LinkSourceFile(fbblt.c,LinkDirectory)
LinkSourceFile(fbbltone.c,LinkDirectory)
LinkSourceFile(fbbstore.c,LinkDirectory)
LinkSourceFile(fbcmap.c,LinkDirectory)
#if BuildRender
LinkSourceFile(fbcompose.c,LinkDirectory)
Expand Down
18 changes: 0 additions & 18 deletions nx-X11/programs/Xserver/fb/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "windowstr.h"
#include "mi.h"
#include "migc.h"
#include "mibstore.h"
#ifdef RENDER
#include "picturestr.h"
#else
Expand Down Expand Up @@ -1220,23 +1219,6 @@ fbBltPlane (FbBits *src,
FbStip bgxor,
Pixel planeMask);

/*
* fbbstore.c
*/
void
fbSaveAreas(PixmapPtr pPixmap,
RegionPtr prgnSave,
int xorg,
int yorg,
WindowPtr pWin);

void
fbRestoreAreas(PixmapPtr pPixmap,
RegionPtr prgnRestore,
int xorg,
int yorg,
WindowPtr pWin);

/*
* fbcmap.c
*/
Expand Down
65 changes: 0 additions & 65 deletions nx-X11/programs/Xserver/fb/fbbstore.c

This file was deleted.

37 changes: 0 additions & 37 deletions nx-X11/programs/Xserver/fb/fbscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ fbSetupScreen(ScreenPtr pScreen,
#ifndef FB_OLD_SCREEN
pScreen->GetWindowPixmap = _fbGetWindowPixmap;
pScreen->SetWindowPixmap = _fbSetWindowPixmap;

pScreen->BackingStoreFuncs.SaveAreas = fbSaveAreas;
pScreen->BackingStoreFuncs.RestoreAreas = fbRestoreAreas;
pScreen->BackingStoreFuncs.SetClipmaskRgn = 0;
pScreen->BackingStoreFuncs.GetImagePixmap = 0;
pScreen->BackingStoreFuncs.GetSpansPixmap = 0;
#endif

return TRUE;
Expand Down Expand Up @@ -245,14 +239,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
pScreen->CreateScreenResources = fb24_32CreateScreenResources;
}
#endif
#if 0
/* leave backing store initialization to the enclosing code so
* it can choose the correct order of wrappers
*/
/* init backing store here so we can overwrite CloseScreen without stepping
* on the backing store wrapped version */
fbInitializeBackingStore (pScreen);
#endif
return TRUE;
}
Expand All @@ -275,26 +261,3 @@ fbScreenInit(ScreenPtr pScreen,
return FALSE;
return TRUE;
}


#ifdef FB_OLD_SCREEN
const miBSFuncRec fbBSFuncRec = {
fbSaveAreas,
fbRestoreAreas,
(void (*)(GCPtr, RegionPtr)) 0,
(PixmapPtr (*)(void)) 0,
(PixmapPtr (*)(void)) 0,
};
#endif

#if 0
void
fbInitializeBackingStore (ScreenPtr pScreen)
{
#ifdef FB_OLD_SCREEN
miInitializeBackingStore (pScreen, (miBSFuncRec *) &fbBSFuncRec);
#else
miInitializeBackingStore (pScreen);
#endif
}
#endif
18 changes: 0 additions & 18 deletions nx-X11/programs/Xserver/hw/nxagent/Drawable.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

#include "compext/Compext.h"

#include "mibstorest.h"

#define PANIC
#define WARNING
#undef TEST
Expand Down Expand Up @@ -3067,7 +3065,6 @@ int nxagentSynchronizationPredicate()
void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPtr pExpose)
{
RegionRec expose;
miBSWindowPtr pBackingStore;

RegionInit(&expose, NullBox, 1);

Expand Down Expand Up @@ -3123,21 +3120,6 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
expose.extents.x1, expose.extents.y1, expose.extents.x2, expose.extents.y2);
#endif

/*
* This prevents hidden region to be exposed.
*/

pBackingStore = (miBSWindowPtr)pWin->backStorage;

if ((pBackingStore != NULL) && (RegionNil(&pBackingStore->SavedRegion) == 0))
{
RegionTranslate(&expose, -pWin -> drawable.x, -pWin -> drawable.y);

RegionSubtract(&expose, &expose, &pBackingStore -> SavedRegion);

RegionTranslate(&expose, pWin -> drawable.x, pWin -> drawable.y);
}

RegionIntersect(&expose, &expose, &pWin -> clipList);

/*
Expand Down
31 changes: 0 additions & 31 deletions nx-X11/programs/Xserver/hw/nxagent/Events.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "selection.h"
#include "keysym.h"
#include "fb.h"
#include "mibstorest.h"
#include "osdep.h"

#include "Agent.h"
Expand Down Expand Up @@ -2545,7 +2544,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
BoxRec rect;
WindowPtr pWin;
StoringPixmapPtr pStoringPixmapRec = NULL;
miBSWindowPtr pBSwindow = NULL;
int drawableType;

pWin = nxagentWindowPtr(X -> xgraphicsexpose.drawable);
Expand All @@ -2561,28 +2559,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)

if (drawableType == DRAWABLE_PIXMAP)
{
pStoringPixmapRec = nxagentFindItemBSPixmapList(X -> xgraphicsexpose.drawable);

if (pStoringPixmapRec == NULL)
{
#ifdef TEST
fprintf(stderr, "nxagentHandleGraphicsExposeEvent: WARNING! Storing pixmap not found.\n");
#endif

return 1;
}

pBSwindow = (miBSWindowPtr) pStoringPixmapRec -> pSavedWindow -> backStorage;

if (pBSwindow == NULL)
{
#ifdef TEST
fprintf(stderr, "nxagentHandleGraphicsExposeEvent: WARNING! Back storage not found.\n");
#endif

return 1;
}

pWin = pStoringPixmapRec -> pSavedWindow;
}

Expand Down Expand Up @@ -2616,13 +2592,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
RegionTranslate(exposeRegion, pStoringPixmapRec -> backingStoreX,
pStoringPixmapRec -> backingStoreY);

/*
* We remove from SavedRegion the part
* affected by the GraphicsExpose event.
*/

RegionSubtract(&(pBSwindow -> SavedRegion), &(pBSwindow -> SavedRegion),
exposeRegion);
}

/*
Expand Down
2 changes: 0 additions & 2 deletions nx-X11/programs/Xserver/hw/nxagent/Init.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
}
}

nxagentInitBSPixmapList();

/*
* Open the display. We are at the early startup and
* the information we'll get from the remote X server
Expand Down
Loading

0 comments on commit 77bd848

Please sign in to comment.