summaryrefslogtreecommitdiff
path: root/hw/xfree86/shadowfb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-08-25 15:08:20 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-08-25 15:08:20 -0400
commitae7f71a8b3d6756161e55d998d6eec37d2695c98 (patch)
tree062e2a706da974db9e40c0fabf25c32355a26916 /hw/xfree86/shadowfb
parentbf0883ae5081bd75569115a3eb27c6d3d336c9f2 (diff)
Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the ad-hoc BS machinery, so it's much prettier to implement the one in terms of the other. Composite now wraps ChangeWindowAttributes and activates automatic redirection for windows with backing store requested. The old backing store infrastructure is completely gutted: ABI-visible structures retain the function pointers, but they never get called, and all the open-coded conditionals throughout the DIX layer to implement BS are gone. Note that this is still not a strictly complete implementation of backing store, since Composite will throw the bits away on unmap and therefore WhenMapped and Always hints are equivalent.
Diffstat (limited to 'hw/xfree86/shadowfb')
-rw-r--r--hw/xfree86/shadowfb/shadow.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 2fc02a7b8..c1b6ed1ce 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -35,13 +35,6 @@
#define MAX(a,b) (((a)>(b))?(a):(b))
static Bool ShadowCloseScreen (int i, ScreenPtr pScreen);
-static void ShadowRestoreAreas (
- PixmapPtr pPixmap,
- RegionPtr prgn,
- int xorg,
- int yorg,
- WindowPtr pWin
-);
static void ShadowPaintWindow (
WindowPtr pWin,
RegionPtr prgn,
@@ -93,7 +86,6 @@ typedef struct {
PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
CreateGCProcPtr CreateGC;
- BackingStoreRestoreAreasProcPtr RestoreAreas;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
#ifdef RENDER
CompositeProcPtr Composite;
@@ -212,7 +204,6 @@ ShadowFBInit2 (
pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
pPriv->CopyWindow = pScreen->CopyWindow;
pPriv->CreateGC = pScreen->CreateGC;
- pPriv->RestoreAreas = pScreen->BackingStoreFuncs.RestoreAreas;
pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader;
pPriv->EnterVT = pScrn->EnterVT;
@@ -223,7 +214,6 @@ ShadowFBInit2 (
pScreen->PaintWindowBorder = ShadowPaintWindow;
pScreen->CopyWindow = ShadowCopyWindow;
pScreen->CreateGC = ShadowCreateGC;
- pScreen->BackingStoreFuncs.RestoreAreas = ShadowRestoreAreas;
pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
pScrn->EnterVT = ShadowEnterVT;
@@ -290,7 +280,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
pScreen->PaintWindowBorder = pPriv->PaintWindowBorder;
pScreen->CopyWindow = pPriv->CopyWindow;
pScreen->CreateGC = pPriv->CreateGC;
- pScreen->BackingStoreFuncs.RestoreAreas = pPriv->RestoreAreas;
pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
pScrn->EnterVT = pPriv->EnterVT;
@@ -307,33 +296,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
return (*pScreen->CloseScreen) (i, pScreen);
}
-
-static void
-ShadowRestoreAreas (
- PixmapPtr pPixmap,
- RegionPtr prgn,
- int xorg,
- int yorg,
- WindowPtr pWin
-){
- ScreenPtr pScreen = pWin->drawable.pScreen;
- ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen);
- int num = 0;
-
- if(pPriv->vtSema && (num = REGION_NUM_RECTS(prgn)))
- if(pPriv->preRefresh)
- (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
-
- pScreen->BackingStoreFuncs.RestoreAreas = pPriv->RestoreAreas;
- (*pScreen->BackingStoreFuncs.RestoreAreas) (
- pPixmap, prgn, xorg, yorg, pWin);
- pScreen->BackingStoreFuncs.RestoreAreas = ShadowRestoreAreas;
-
- if(num && pPriv->postRefresh)
- (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
-}
-
-
static void
ShadowPaintWindow(
WindowPtr pWin,