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.
This commit is contained in:
parent
bf0883ae50
commit
ae7f71a8b3
|
@ -329,10 +329,6 @@ bufCreateBuffer(pScreen, pWin, bufferNum)
|
|||
pBuffer->firstChild = NULL;
|
||||
pBuffer->lastChild = NULL;
|
||||
|
||||
/* XXX - Worry about backingstore later */
|
||||
pBuffer->backStorage = NULL;
|
||||
pBuffer->backingStore = NotUseful;
|
||||
|
||||
/* XXX - Need to call pScreen->CreateWindow for tile/stipples
|
||||
* or should I just copy the devPrivates?
|
||||
*/
|
||||
|
@ -505,18 +501,6 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
|
|||
|
||||
pScreen = pBuffer->drawable.pScreen;
|
||||
REGION_INIT(pScreen, ®, &box, 1);
|
||||
if (pBuffer->backStorage)
|
||||
{
|
||||
/*
|
||||
* If the window has backing-store on, call through the
|
||||
* ClearToBackground vector to handle the special semantics
|
||||
* (i.e. things backing store is to be cleared out and
|
||||
* an Expose event is to be generated for those areas in backing
|
||||
* store if generateExposures is TRUE).
|
||||
*/
|
||||
pBSReg = (* pScreen->ClearBackingStore)(pBuffer, x, y, w, h,
|
||||
generateExposures);
|
||||
}
|
||||
|
||||
REGION_INTERSECT(pScreen, ®, ®, &pBuffer->clipList);
|
||||
if (pBuffer->backgroundState != None)
|
||||
|
|
|
@ -10,7 +10,7 @@ libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpi
|
|||
afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \
|
||||
afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \
|
||||
afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \
|
||||
afbmisc.c afbbstore.c afbtegblt.c $(libafb_gen_sources)
|
||||
afbmisc.c afbtegblt.c $(libafb_gen_sources)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/hw/xfree86/os-support
|
||||
|
||||
|
|
16
afb/afb.h
16
afb/afb.h
|
@ -182,23 +182,7 @@ extern void afbBresD(
|
|||
unsigned char * /*rrops*/,
|
||||
unsigned char * /*bgrrops*/
|
||||
);
|
||||
/* afbbstore.c */
|
||||
|
||||
extern void afbSaveAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnSave*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
|
||||
extern void afbRestoreAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnRestore*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
/* afbclip.c */
|
||||
|
||||
extern RegionPtr afbPixmapToRegion(
|
||||
|
|
154
afb/afbbstore.c
154
afb/afbbstore.c
|
@ -1,154 +0,0 @@
|
|||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
||||
/*
|
||||
|
||||
Copyright (c) 1987 X Consortium
|
||||
|
||||
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 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 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 X CONSORTIUM 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 X Consortium 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 X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "afb.h"
|
||||
#include <X11/X.h>
|
||||
#include "mibstore.h"
|
||||
#include "regionstr.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* afbSaveAreas --
|
||||
* Function called by miSaveAreas to actually fetch the areas to be
|
||||
* saved into the backing pixmap. This is very simple to do, since
|
||||
* afbDoBitblt is designed for this very thing. The region to save is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the screen
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the screen into the pixmap.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
afbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnSave; /* Region to save (pixmap-relative) */
|
||||
int xorg; /* X origin of region */
|
||||
int yorg; /* Y origin of region */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int numRects;
|
||||
|
||||
numRects = REGION_NUM_RECTS(prgnSave);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects * sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnSave);
|
||||
pPt = pPtsInit;
|
||||
while (numRects--) {
|
||||
pPt->x = pBox->x1 + xorg;
|
||||
pPt->y = pBox->y1 + yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
afbDoBitblt((DrawablePtr)pPixmap->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr,
|
||||
(DrawablePtr)pPixmap,
|
||||
GXcopy,
|
||||
prgnSave,
|
||||
pPtsInit, wBackingBitPlanes (pWin));
|
||||
|
||||
DEALLOCATE_LOCAL(pPtsInit);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* afbRestoreAreas --
|
||||
* Function called by miRestoreAreas to actually fetch the areas to be
|
||||
* restored from the backing pixmap. This is very simple to do, since
|
||||
* afbDoBitblt is designed for this very thing. The region to restore is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the pixmap
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the pixmap into the screen.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
afbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnRestore; /* Region to restore (screen-relative)*/
|
||||
int xorg; /* X origin of window */
|
||||
int yorg; /* Y origin of window */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int numRects;
|
||||
|
||||
numRects = REGION_NUM_RECTS(prgnRestore);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects*sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnRestore);
|
||||
pPt = pPtsInit;
|
||||
while (numRects--) {
|
||||
pPt->x = pBox->x1 - xorg;
|
||||
pPt->y = pBox->y1 - yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
afbDoBitblt((DrawablePtr)pPixmap,
|
||||
(DrawablePtr)pPixmap->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr,
|
||||
GXcopy,
|
||||
prgnRestore,
|
||||
pPtsInit, wBackingBitPlanes (pWin));
|
||||
|
||||
DEALLOCATE_LOCAL(pPtsInit);
|
||||
}
|
|
@ -77,14 +77,6 @@ int afbScreenPrivateIndex;
|
|||
|
||||
static unsigned long afbGeneration = 0;
|
||||
|
||||
static BSFuncRec afbBSFuncRec = {
|
||||
afbSaveAreas,
|
||||
afbRestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
(BackingStoreGetImagePixmapProcPtr) 0,
|
||||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
static Bool
|
||||
afbCloseScreen(int index, ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -231,7 +223,6 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
|
|||
|
||||
pScreen->CloseScreen = afbCloseScreen;
|
||||
pScreen->CreateScreenResources = afbCreateScreenResources;
|
||||
pScreen->BackingStoreFuncs = afbBSFuncRec;
|
||||
|
||||
pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate;
|
||||
pScreen->devPrivate = oldDevPrivate;
|
||||
|
|
|
@ -15,7 +15,7 @@ libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \
|
|||
$(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \
|
||||
$(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \
|
||||
$(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \
|
||||
$(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \
|
||||
$(top_srcdir)/cfb/cfbpolypnt.c \
|
||||
$(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \
|
||||
$(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \
|
||||
$(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \
|
||||
|
|
16
cfb/cfb.h
16
cfb/cfb.h
|
@ -486,23 +486,7 @@ extern void cfbBresD(
|
|||
int /*e2*/,
|
||||
int /*len*/
|
||||
);
|
||||
/* cfbbstore.c */
|
||||
|
||||
extern void cfbSaveAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnSave*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
|
||||
extern void cfbRestoreAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnRestore*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
/* cfbcmap.c */
|
||||
|
||||
#ifndef CFB_PROTOTYPES_ONLY
|
||||
|
|
143
cfb/cfbbstore.c
143
cfb/cfbbstore.c
|
@ -1,143 +0,0 @@
|
|||
/*-
|
||||
* cfbbstore.c --
|
||||
* Functions required by the backing-store implementation in MI.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "cfb.h"
|
||||
#include <X11/X.h>
|
||||
#include "mibstore.h"
|
||||
#include "regionstr.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* cfbSaveAreas --
|
||||
* Function called by miSaveAreas to actually fetch the areas to be
|
||||
* saved into the backing pixmap. This is very simple to do, since
|
||||
* cfbDoBitblt is designed for this very thing. The region to save is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the screen
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the screen into the pixmap.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
cfbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnSave; /* Region to save (pixmap-relative) */
|
||||
int xorg; /* X origin of region */
|
||||
int yorg; /* Y origin of region */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int i;
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
PixmapPtr pScrPix;
|
||||
|
||||
i = REGION_NUM_RECTS(prgnSave);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i * sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnSave);
|
||||
pPt = pPtsInit;
|
||||
while (--i >= 0) {
|
||||
pPt->x = pBox->x1 + xorg;
|
||||
pPt->y = pBox->y1 + yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
pScrPix = (*pScreen->GetWindowPixmap)(pWin);
|
||||
|
||||
|
||||
cfbDoBitbltCopy((DrawablePtr) pScrPix, (DrawablePtr)pPixmap,
|
||||
GXcopy, prgnSave, pPtsInit, ~0L);
|
||||
|
||||
DEALLOCATE_LOCAL (pPtsInit);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* cfbRestoreAreas --
|
||||
* Function called by miRestoreAreas to actually fetch the areas to be
|
||||
* restored from the backing pixmap. This is very simple to do, since
|
||||
* cfbDoBitblt is designed for this very thing. The region to restore is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the pixmap
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the pixmap into the screen.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
cfbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnRestore; /* Region to restore (screen-relative)*/
|
||||
int xorg; /* X origin of window */
|
||||
int yorg; /* Y origin of window */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int i;
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
PixmapPtr pScrPix;
|
||||
|
||||
i = REGION_NUM_RECTS(prgnRestore);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i*sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnRestore);
|
||||
pPt = pPtsInit;
|
||||
while (--i >= 0) {
|
||||
pPt->x = pBox->x1 - xorg;
|
||||
pPt->y = pBox->y1 - yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
pScrPix = (*pScreen->GetWindowPixmap)(pWin);
|
||||
|
||||
cfbDoBitbltCopy((DrawablePtr)pPixmap, (DrawablePtr) pScrPix,
|
||||
GXcopy, prgnRestore, pPtsInit, ~0L);
|
||||
|
||||
DEALLOCATE_LOCAL (pPtsInit);
|
||||
}
|
|
@ -46,14 +46,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "cfbmskbits.h"
|
||||
#include "mibstore.h"
|
||||
|
||||
BSFuncRec cfbBSFuncRec = {
|
||||
cfbSaveAreas,
|
||||
cfbRestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
(BackingStoreGetImagePixmapProcPtr) 0,
|
||||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
Bool
|
||||
cfbCloseScreen (index, pScreen)
|
||||
int index;
|
||||
|
@ -184,7 +176,6 @@ cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
|||
pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate;
|
||||
pScreen->devPrivate = oldDevPrivate;
|
||||
#endif
|
||||
pScreen->BackingStoreFuncs = cfbBSFuncRec;
|
||||
pScreen->GetScreenPixmap = cfbGetScreenPixmap;
|
||||
pScreen->SetScreenPixmap = cfbSetScreenPixmap;
|
||||
return TRUE;
|
||||
|
|
|
@ -63,6 +63,7 @@ compCloseScreen (int index, ScreenPtr pScreen)
|
|||
pScreen->CloseScreen = cs->CloseScreen;
|
||||
pScreen->BlockHandler = cs->BlockHandler;
|
||||
pScreen->InstallColormap = cs->InstallColormap;
|
||||
pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes;
|
||||
pScreen->ReparentWindow = cs->ReparentWindow;
|
||||
pScreen->MoveWindow = cs->MoveWindow;
|
||||
pScreen->ResizeWindow = cs->ResizeWindow;
|
||||
|
@ -109,6 +110,33 @@ compInstallColormap (ColormapPtr pColormap)
|
|||
pScreen->InstallColormap = compInstallColormap;
|
||||
}
|
||||
|
||||
/* Fake backing store via automatic redirection */
|
||||
static Bool
|
||||
compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
CompScreenPtr cs = GetCompScreen (pScreen);
|
||||
Bool ret;
|
||||
|
||||
pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes;
|
||||
ret = pScreen->ChangeWindowAttributes(pWin, mask);
|
||||
|
||||
if (ret && (mask & CWBackingStore)) {
|
||||
if (pWin->backingStore != NotUseful) {
|
||||
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
||||
pWin->backStorage = TRUE;
|
||||
} else {
|
||||
compUnredirectWindow(serverClient, pWin,
|
||||
CompositeRedirectAutomatic);
|
||||
pWin->backStorage = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
pScreen->ChangeWindowAttributes = compChangeWindowAttributes;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
compScreenUpdate (ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -424,6 +452,9 @@ compScreenInit (ScreenPtr pScreen)
|
|||
cs->InstallColormap = pScreen->InstallColormap;
|
||||
pScreen->InstallColormap = compInstallColormap;
|
||||
|
||||
cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||
pScreen->ChangeWindowAttributes = compChangeWindowAttributes;
|
||||
|
||||
cs->BlockHandler = pScreen->BlockHandler;
|
||||
pScreen->BlockHandler = compBlockHandler;
|
||||
|
||||
|
|
|
@ -143,6 +143,11 @@ typedef struct _CompScreen {
|
|||
*/
|
||||
InstallColormapProcPtr InstallColormap;
|
||||
|
||||
/*
|
||||
* Fake backing store via automatic redirection
|
||||
*/
|
||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||
|
||||
ScreenBlockHandlerProcPtr BlockHandler;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
Bool damaged;
|
||||
|
|
|
@ -175,7 +175,6 @@ static Bool TileScreenSaver(int i, int kind);
|
|||
|
||||
#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
|
||||
|
||||
|
||||
_X_EXPORT int numSaveUndersViewable = 0;
|
||||
_X_EXPORT int deltaSaveUndersViewable = 0;
|
||||
|
||||
|
@ -3031,9 +3030,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;
|
||||
}
|
||||
|
@ -3161,9 +3157,6 @@ UnmapSubwindows(WindowPtr pWin)
|
|||
#ifdef DO_SAVE_UNDERS
|
||||
pChild->DIXsaveUnder = FALSE;
|
||||
#endif /* DO_SAVE_UNDERS */
|
||||
if (pChild->backStorage)
|
||||
(*pScreen->SaveDoomedAreas)(
|
||||
pChild, &pChild->clipList, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -666,8 +666,6 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
|
|
|
@ -268,20 +268,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
|||
int nspans,
|
||||
char *pdstStart);
|
||||
|
||||
void
|
||||
ExaCheckSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
void
|
||||
ExaCheckRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
void
|
||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
|
|
|
@ -283,34 +283,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
|||
exaFinishAccess (pDrawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
EXA_FALLBACK(("from %p (%c)\n", &pPixmap->drawable,
|
||||
exaDrawableLocation(&pPixmap->drawable)));
|
||||
exaPrepareAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST);
|
||||
fbSaveAreas (pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
exaFinishAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
EXA_FALLBACK(("to %p (%c)\n", &pPixmap->drawable,
|
||||
exaDrawableLocation(&pPixmap->drawable)));
|
||||
exaPrepareAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST);
|
||||
fbRestoreAreas (pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
exaFinishAccess ((DrawablePtr)pPixmap, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
/* XXX: Note the lack of a prepare on the tile, if the window has a tiled
|
||||
* background. This function happens to only be called if pExaScr->swappedOut,
|
||||
* so we actually end up not having to do it since the tile won't be in fb.
|
||||
|
|
|
@ -24,7 +24,6 @@ libfb_la_SOURCES = \
|
|||
fbbits.h \
|
||||
fbblt.c \
|
||||
fbbltone.c \
|
||||
fbbstore.c \
|
||||
fbcopy.c \
|
||||
fbfill.c \
|
||||
fbfillrect.c \
|
||||
|
|
17
fb/fb.h
17
fb/fb.h
|
@ -1261,23 +1261,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
|
||||
*/
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Copyright © 1998 Keith Packard
|
||||
*
|
||||
* 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, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "fb.h"
|
||||
|
||||
void
|
||||
fbSaveAreas(PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
fbCopyWindowProc (&pWin->drawable,
|
||||
&pPixmap->drawable,
|
||||
0,
|
||||
REGION_RECTS(prgnSave),
|
||||
REGION_NUM_RECTS(prgnSave),
|
||||
xorg, yorg,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0,0);
|
||||
}
|
||||
|
||||
void
|
||||
fbRestoreAreas(PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
fbCopyWindowProc (&pPixmap->drawable,
|
||||
&pWin->drawable,
|
||||
0,
|
||||
REGION_RECTS(prgnRestore),
|
||||
REGION_NUM_RECTS(prgnRestore),
|
||||
-xorg, -yorg,
|
||||
FALSE,
|
||||
FALSE,
|
||||
0,0);
|
||||
}
|
|
@ -142,12 +142,6 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
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;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -992,7 +992,7 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
|
|||
WindowPtr pChild;
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
Bool anyMarked = TRUE;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
RegionPtr pOldClip = NULL;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -1048,12 +1048,6 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
|
|||
|
||||
if (WasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
if (pWin->firstChild)
|
||||
{
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
||||
|
@ -1077,28 +1071,6 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL 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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
|
|
@ -223,30 +223,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
|||
fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
||||
}
|
||||
|
||||
void
|
||||
KdCheckSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
kaaWaitSync(pWin->drawable.pScreen);
|
||||
kaaDrawableDirty (&pPixmap->drawable);
|
||||
fbSaveAreas (pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
void
|
||||
KdCheckRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
kaaWaitSync(pWin->drawable.pScreen);
|
||||
kaaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbRestoreAreas (pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
void
|
||||
KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
||||
{
|
||||
|
@ -292,9 +268,6 @@ KdScreenInitAsync (ScreenPtr pScreen)
|
|||
pScreen->PaintWindowBackground = KdCheckPaintWindow;
|
||||
pScreen->PaintWindowBorder = KdCheckPaintWindow;
|
||||
pScreen->CopyWindow = KdCheckCopyWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
KdPictureInitAsync (pScreen);
|
||||
#endif
|
||||
|
|
|
@ -101,7 +101,7 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
|||
WindowPtr pChild;
|
||||
Bool WasViewable;
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = 0, bsExposed;
|
||||
RegionPtr pOldClip = 0;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -159,12 +159,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
|||
|
||||
if (WasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
if (pWin->firstChild)
|
||||
{
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
||||
|
@ -188,28 +182,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL 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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
|
|
@ -611,20 +611,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
|||
int nspans,
|
||||
char *pdstStart);
|
||||
|
||||
void
|
||||
KdCheckSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
void
|
||||
KdCheckRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
void
|
||||
KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
|
|
|
@ -1114,7 +1114,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
|||
WindowPtr pChild;
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
RegionPtr pOldClip = NULL;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -1175,12 +1175,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
|||
|
||||
if (WasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
if (pWin->firstChild)
|
||||
{
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
||||
|
@ -1204,28 +1198,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool 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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
|
|
@ -102,7 +102,6 @@ typedef struct _RACScreen {
|
|||
PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClearToBackgroundProcPtr ClearToBackground;
|
||||
BSFuncRec BackingStoreFuncs;
|
||||
CreatePixmapProcPtr CreatePixmap;
|
||||
SaveScreenProcPtr SaveScreen;
|
||||
/* Colormap */
|
||||
|
@ -146,10 +145,6 @@ static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
|||
RegionPtr prgnSrc );
|
||||
static void RACClearToBackground (WindowPtr pWin, int x, int y,
|
||||
int w, int h, Bool generateExposures );
|
||||
static void RACSaveAreas (PixmapPtr pPixmap, RegionPtr prgnSave,
|
||||
int xorg, int yorg, WindowPtr pWin);
|
||||
static void RACRestoreAreas (PixmapPtr pPixmap, RegionPtr prgnRestore,
|
||||
int xorg, int yorg, WindowPtr pWin);
|
||||
static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth);
|
||||
static Bool RACCreateGC(GCPtr pGC);
|
||||
static Bool RACSaveScreen(ScreenPtr pScreen, Bool unblank);
|
||||
|
@ -306,8 +301,6 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag)
|
|||
WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB);
|
||||
WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB);
|
||||
WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB);
|
||||
WRAP_SCREEN_COND(BackingStoreFuncs.RestoreAreas, RACRestoreAreas, RAC_FB);
|
||||
WRAP_SCREEN_COND(BackingStoreFuncs.SaveAreas, RACSaveAreas, RAC_FB);
|
||||
WRAP_SCREEN_COND(StoreColors, RACStoreColors, RAC_COLORMAP);
|
||||
WRAP_SCREEN_COND(DisplayCursor, RACDisplayCursor, RAC_CURSOR);
|
||||
WRAP_SCREEN_COND(RealizeCursor, RACRealizeCursor, RAC_CURSOR);
|
||||
|
@ -352,8 +345,6 @@ RACCloseScreen (int i, ScreenPtr pScreen)
|
|||
UNWRAP_SCREEN(PaintWindowBorder);
|
||||
UNWRAP_SCREEN(CopyWindow);
|
||||
UNWRAP_SCREEN(ClearToBackground);
|
||||
UNWRAP_SCREEN(BackingStoreFuncs.RestoreAreas);
|
||||
UNWRAP_SCREEN(BackingStoreFuncs.SaveAreas);
|
||||
UNWRAP_SCREEN(SaveScreen);
|
||||
UNWRAP_SCREEN(StoreColors);
|
||||
UNWRAP_SCREEN(DisplayCursor);
|
||||
|
@ -498,45 +489,6 @@ RACClearToBackground (
|
|||
SCREEN_EPILOG (ClearToBackground, RACClearToBackground);
|
||||
}
|
||||
|
||||
static void
|
||||
RACSaveAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
DPRINT_S("RACSaveAreas",pScreen->myNum);
|
||||
SCREEN_PROLOG (BackingStoreFuncs.SaveAreas);
|
||||
ENABLE;
|
||||
(*pScreen->BackingStoreFuncs.SaveAreas) (
|
||||
pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
|
||||
SCREEN_EPILOG (BackingStoreFuncs.SaveAreas, RACSaveAreas);
|
||||
}
|
||||
|
||||
static void
|
||||
RACRestoreAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
|
||||
DPRINT_S("RACRestoreAreas",pScreen->myNum);
|
||||
SCREEN_PROLOG (BackingStoreFuncs.RestoreAreas);
|
||||
ENABLE;
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas) (
|
||||
pPixmap, prgnRestore, xorg, yorg, pWin);
|
||||
|
||||
SCREEN_EPILOG ( BackingStoreFuncs.RestoreAreas, RACRestoreAreas);
|
||||
}
|
||||
|
||||
static PixmapPtr
|
||||
RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -32,10 +32,6 @@ static void XAAGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
|
|||
int *pwidth, int nspans, char *pdstStart);
|
||||
static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth);
|
||||
static Bool XAADestroyPixmap(PixmapPtr pPixmap);
|
||||
static void XAARestoreAreas (PixmapPtr pPixmap, RegionPtr prgnRestore,
|
||||
int xorg, int yorg, WindowPtr pWin);
|
||||
static void XAASaveAreas (PixmapPtr pPixmap, RegionPtr prgnSave,
|
||||
int xorg, int yorg, WindowPtr pWin);
|
||||
static Bool XAAEnterVT (int index, int flags);
|
||||
static void XAALeaveVT (int index, int flags);
|
||||
static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
|
||||
|
@ -157,10 +153,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
infoRec->PaintWindowBorder = XAAPaintWindow;
|
||||
if(!infoRec->CopyWindow)
|
||||
infoRec->CopyWindow = XAACopyWindow;
|
||||
if(!infoRec->SaveAreas)
|
||||
infoRec->SaveAreas = XAASaveAreas;
|
||||
if(!infoRec->RestoreAreas)
|
||||
infoRec->RestoreAreas = XAARestoreAreas;
|
||||
|
||||
pScreenPriv->CreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = XAACreateGC;
|
||||
|
@ -180,12 +172,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
pScreen->CreatePixmap = XAACreatePixmap;
|
||||
pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = XAADestroyPixmap;
|
||||
pScreenPriv->BackingStoreFuncs.RestoreAreas =
|
||||
pScreen->BackingStoreFuncs.RestoreAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = infoRec->RestoreAreas;
|
||||
pScreenPriv->BackingStoreFuncs.SaveAreas =
|
||||
pScreen->BackingStoreFuncs.SaveAreas;
|
||||
pScreen->BackingStoreFuncs.SaveAreas = infoRec->SaveAreas;
|
||||
pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||
pScreen->ChangeWindowAttributes = XAAChangeWindowAttributes;
|
||||
|
||||
|
@ -256,10 +242,6 @@ XAACloseScreen (int i, ScreenPtr pScreen)
|
|||
pScreen->WindowExposures = pScreenPriv->WindowExposures;
|
||||
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
|
||||
pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas =
|
||||
pScreenPriv->BackingStoreFuncs.RestoreAreas;
|
||||
pScreen->BackingStoreFuncs.SaveAreas =
|
||||
pScreenPriv->BackingStoreFuncs.SaveAreas;
|
||||
pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
|
||||
|
||||
/* We leave it up to the client to free the XAAInfoRec */
|
||||
|
@ -326,137 +308,6 @@ XAAGetSpans (
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
XAASaveAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
||||
|
||||
if(IS_OFFSCREEN_PIXMAP(pPixmap)) {
|
||||
BoxPtr pbox = REGION_RECTS(prgnSave);
|
||||
int nboxes = REGION_NUM_RECTS(prgnSave);
|
||||
|
||||
(*infoRec->SetupForScreenToScreenCopy)(pScrn, 1, 1, GXcopy, ~0, -1);
|
||||
while(nboxes--) {
|
||||
(*infoRec->SubsequentScreenToScreenCopy)(pScrn,
|
||||
pbox->x1 + xorg, pbox->y1 + yorg,
|
||||
pPixmap->drawable.x + pbox->x1,
|
||||
pPixmap->drawable.y + pbox->y1,
|
||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||
pbox++;
|
||||
}
|
||||
SET_SYNC_FLAG(infoRec);
|
||||
return;
|
||||
}
|
||||
|
||||
if(xf86Screens[pScreen->myNum]->vtSema && infoRec->ReadPixmap &&
|
||||
(pWin->drawable.bitsPerPixel == pPixmap->drawable.bitsPerPixel)) {
|
||||
BoxPtr pbox = REGION_RECTS(prgnSave);
|
||||
int nboxes = REGION_NUM_RECTS(prgnSave);
|
||||
int Bpp = pPixmap->drawable.bitsPerPixel >> 3;
|
||||
unsigned char *dstp = (unsigned char*)pPixmap->devPrivate.ptr;
|
||||
|
||||
while(nboxes--) {
|
||||
(*infoRec->ReadPixmap)(infoRec->pScrn,
|
||||
pbox->x1 + xorg, pbox->y1 + yorg,
|
||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1,
|
||||
dstp + (pPixmap->devKind * pbox->y1) + (pbox->x1 * Bpp),
|
||||
pPixmap->devKind,
|
||||
pPixmap->drawable.bitsPerPixel, pPixmap->drawable.depth);
|
||||
pbox++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
XAA_SCREEN_PROLOGUE (pScreen, BackingStoreFuncs.SaveAreas);
|
||||
if(pScrn->vtSema) {
|
||||
SYNC_CHECK(&pWin->drawable);
|
||||
}
|
||||
(*pScreen->BackingStoreFuncs.SaveAreas) (
|
||||
pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
|
||||
XAA_SCREEN_EPILOGUE (pScreen, BackingStoreFuncs.SaveAreas,
|
||||
XAASaveAreas);
|
||||
}
|
||||
|
||||
static void
|
||||
XAARestoreAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
||||
|
||||
if(IS_OFFSCREEN_PIXMAP(pPixmap)) {
|
||||
BoxPtr pbox = REGION_RECTS(prgnRestore);
|
||||
int nboxes = REGION_NUM_RECTS(prgnRestore);
|
||||
int pm = ~0;
|
||||
|
||||
if((pScrn->overlayFlags & OVERLAY_8_32_PLANAR) &&
|
||||
(pWin->drawable.depth == 24))
|
||||
pm = 0x00ffffff;
|
||||
|
||||
(*infoRec->SetupForScreenToScreenCopy)(pScrn, 1, 1, GXcopy, pm, -1);
|
||||
while(nboxes--) {
|
||||
(*infoRec->SubsequentScreenToScreenCopy)(pScrn,
|
||||
pPixmap->drawable.x + pbox->x1 - xorg,
|
||||
pPixmap->drawable.y + pbox->y1 - yorg,
|
||||
pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||
pbox++;
|
||||
}
|
||||
SET_SYNC_FLAG(infoRec);
|
||||
return;
|
||||
}
|
||||
|
||||
if(pScrn->vtSema && infoRec->WritePixmap &&
|
||||
!(infoRec->WritePixmapFlags & NO_GXCOPY) &&
|
||||
((pWin->drawable.bitsPerPixel == pPixmap->drawable.bitsPerPixel) ||
|
||||
((pWin->drawable.bitsPerPixel == 24) &&
|
||||
(pPixmap->drawable.bitsPerPixel == 32) &&
|
||||
(infoRec->WritePixmapFlags & CONVERT_32BPP_TO_24BPP)))) {
|
||||
BoxPtr pbox = REGION_RECTS(prgnRestore);
|
||||
int nboxes = REGION_NUM_RECTS(prgnRestore);
|
||||
int Bpp = pPixmap->drawable.bitsPerPixel >> 3;
|
||||
unsigned char *srcp = (unsigned char*)pPixmap->devPrivate.ptr;
|
||||
int pm = ~0;
|
||||
|
||||
if((pScrn->overlayFlags & OVERLAY_8_32_PLANAR) &&
|
||||
(pWin->drawable.depth == 24))
|
||||
pm = 0x00ffffff;
|
||||
|
||||
while(nboxes--) {
|
||||
(*infoRec->WritePixmap)(pScrn, pbox->x1, pbox->y1,
|
||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1,
|
||||
srcp + (pPixmap->devKind * (pbox->y1 - yorg)) +
|
||||
((pbox->x1 - xorg) * Bpp),
|
||||
pPixmap->devKind, GXcopy, pm, -1,
|
||||
pPixmap->drawable.bitsPerPixel, pPixmap->drawable.depth);
|
||||
pbox++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
XAA_SCREEN_PROLOGUE (pScreen, BackingStoreFuncs.RestoreAreas);
|
||||
if(pScrn->vtSema) {
|
||||
SYNC_CHECK(&pWin->drawable);
|
||||
}
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas) (
|
||||
pPixmap, prgnRestore, xorg, yorg, pWin);
|
||||
|
||||
XAA_SCREEN_EPILOGUE (pScreen, BackingStoreFuncs.RestoreAreas,
|
||||
XAARestoreAreas);
|
||||
}
|
||||
|
||||
static int
|
||||
XAAPixmapBPP (ScreenPtr pScreen, int depth)
|
||||
{
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
static void XAAOverCopyWindow(WindowPtr, DDXPointRec, RegionPtr);
|
||||
static void XAAOverPaintWindow(WindowPtr, RegionPtr, int);
|
||||
static void XAAOverWindowExposures(WindowPtr, RegionPtr, RegionPtr);
|
||||
static void XAAOverSaveAreas(PixmapPtr, RegionPtr, int, int, WindowPtr);
|
||||
static void XAAOverRestoreAreas(PixmapPtr, RegionPtr, int, int, WindowPtr);
|
||||
|
||||
|
||||
static int XAAOverStippledFillChooser(GCPtr);
|
||||
static int XAAOverOpaqueStippledFillChooser(GCPtr);
|
||||
|
@ -200,8 +197,6 @@ XAAInitDualFramebufferOverlay(
|
|||
pScreen->PaintWindowBackground = XAAOverPaintWindow;
|
||||
pScreen->PaintWindowBorder = XAAOverPaintWindow;
|
||||
pScreen->WindowExposures = XAAOverWindowExposures;
|
||||
pScreen->BackingStoreFuncs.SaveAreas = XAAOverSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = XAAOverRestoreAreas;
|
||||
|
||||
pOverPriv->StippledFillChooser = infoRec->StippledFillChooser;
|
||||
pOverPriv->OpaqueStippledFillChooser = infoRec->OpaqueStippledFillChooser;
|
||||
|
@ -495,46 +490,6 @@ XAAOverWindowExposures(
|
|||
XAA_SCREEN_EPILOGUE(pScreen, WindowExposures, XAAOverWindowExposures);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
XAAOverSaveAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pWin->drawable.pScreen);
|
||||
XAAInfoRecPtr infoRec =
|
||||
GET_XAAINFORECPTR_FROM_DRAWABLE((DrawablePtr)pWin);
|
||||
|
||||
if(pOverPriv->pScrn->vtSema) {
|
||||
SWITCH_DEPTH(pWin->drawable.depth);
|
||||
}
|
||||
|
||||
(*infoRec->SaveAreas)(pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
XAAOverRestoreAreas (
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pWin->drawable.pScreen);
|
||||
XAAInfoRecPtr infoRec =
|
||||
GET_XAAINFORECPTR_FROM_DRAWABLE((DrawablePtr)pWin);
|
||||
|
||||
if(pOverPriv->pScrn->vtSema) {
|
||||
SWITCH_DEPTH(pWin->drawable.depth);
|
||||
}
|
||||
|
||||
(*infoRec->RestoreAreas)(pPixmap, prgnRestore, xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
/********************* Choosers *************************/
|
||||
|
||||
static int
|
||||
|
|
|
@ -262,8 +262,6 @@ typedef struct _XAAStateWrapRec {
|
|||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
BackingStoreSaveAreasProcPtr SaveAreas;
|
||||
BackingStoreRestoreAreasProcPtr RestoreAreas;
|
||||
#ifdef RENDER
|
||||
Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op,
|
||||
CARD16 red, CARD16 green,
|
||||
|
@ -1481,26 +1479,6 @@ static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
|||
prgnSrc);
|
||||
}
|
||||
|
||||
static void XAAStateWrapSaveAreas(PixmapPtr pBackingPixmap, RegionPtr pObscured, int x,
|
||||
int y, WindowPtr pWin)
|
||||
{
|
||||
GET_STATEPRIV_SCREEN(pBackingPixmap->drawable.pScreen);
|
||||
STATE_CHECK_SP(pStatePriv);
|
||||
|
||||
(*pStatePriv->SaveAreas)(pBackingPixmap, pObscured, x,
|
||||
y, pWin);
|
||||
}
|
||||
|
||||
static void XAAStateWrapRestoreAreas(PixmapPtr pBackingPixmap, RegionPtr pExposed,
|
||||
int x, int y, WindowPtr pWin)
|
||||
{
|
||||
GET_STATEPRIV_SCREEN(pBackingPixmap->drawable.pScreen);
|
||||
STATE_CHECK_SP(pStatePriv);
|
||||
|
||||
(*pStatePriv->RestoreAreas)(pBackingPixmap, pExposed,
|
||||
x, y, pWin);
|
||||
}
|
||||
|
||||
#ifdef RENDER
|
||||
static Bool XAAStateWrapSetupForCPUToScreenAlphaTexture2(ScrnInfoPtr pScrn,
|
||||
int op, CARD16 red,
|
||||
|
@ -1674,8 +1652,6 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
XAA_STATE_WRAP(PaintWindowBackground);
|
||||
XAA_STATE_WRAP(PaintWindowBorder);
|
||||
XAA_STATE_WRAP(CopyWindow);
|
||||
XAA_STATE_WRAP(SaveAreas);
|
||||
XAA_STATE_WRAP(RestoreAreas);
|
||||
#ifdef RENDER
|
||||
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2);
|
||||
XAA_STATE_WRAP(SetupForCPUToScreenTexture2);
|
||||
|
|
|
@ -49,7 +49,6 @@ typedef struct _XAAScreen {
|
|||
PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
BSFuncRec BackingStoreFuncs;
|
||||
CreatePixmapProcPtr CreatePixmap;
|
||||
DestroyPixmapProcPtr DestroyPixmap;
|
||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||
|
|
|
@ -32,7 +32,6 @@ libxf1bppmfb_a_SOURCES = \
|
|||
mfbbitblt.c \
|
||||
mfbbres.c \
|
||||
mfbbresd.c \
|
||||
mfbbstore.c \
|
||||
mfbclip.c \
|
||||
mfbcmap.c \
|
||||
mfbfillarc.c \
|
||||
|
|
|
@ -6,7 +6,6 @@ libxf4bpp_la_LDFLAGS = -avoid-version
|
|||
|
||||
libxf4bpp_la_SOURCES = \
|
||||
ppcArea.c \
|
||||
ppcBStore.c \
|
||||
ppcClip.c \
|
||||
ppcCpArea.c \
|
||||
ppcCReduce.c \
|
||||
|
|
|
@ -1,155 +0,0 @@
|
|||
/*
|
||||
|
||||
Copyright (c) 1987 X Consortium
|
||||
|
||||
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 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 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 X CONSORTIUM 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 X Consortium 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 X Consortium.
|
||||
|
||||
|
||||
Copyright IBM Corporation 1987,1988,1989
|
||||
All Rights Reserved
|
||||
|
||||
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 and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of IBM not be
|
||||
used in advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Copyright 1987 by the Regents of the University of California
|
||||
All Rights Reserved
|
||||
|
||||
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 and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Digital not be
|
||||
used in advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
#include "xf4bpp.h"
|
||||
#include "vgaVideo.h"
|
||||
#include "ibmTrace.h"
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* xf4bppSaveAreas --
|
||||
* Function called by miSaveAreas to actually fetch the areas to be
|
||||
* saved into the backing pixmap.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the screen into the pixmap.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
xf4bppSaveAreas( pPixmap, prgnSave, xorg, yorg, pWin )
|
||||
register PixmapPtr pPixmap ; /* Backing pixmap */
|
||||
RegionPtr prgnSave ; /* Region to save (pixmap-relative) */
|
||||
int xorg ; /* X origin of region */
|
||||
int yorg ; /* Y origin of region */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register BoxPtr pBox ;
|
||||
register int nBox ;
|
||||
|
||||
TRACE( ( "xf4bppSaveAreas(0x%x,0x%x,%d,%d)\n",
|
||||
pPixmap, prgnSave, xorg, yorg ) ) ;
|
||||
/* WHOOP WHOOP WHOOP XXX -- depth 8 *only* */ /* GJA -- ? */
|
||||
|
||||
if ( !( nBox = REGION_NUM_RECTS(prgnSave) ) )
|
||||
return ;
|
||||
|
||||
for ( pBox = REGION_RECTS(prgnSave) ; nBox-- ; pBox++ )
|
||||
xf4bppReadColorImage( pWin, pBox->x1 + xorg,
|
||||
pBox->y1 + yorg,
|
||||
pBox->x2 - pBox->x1,
|
||||
pBox->y2 - pBox->y1,
|
||||
( (unsigned char *) pPixmap->devPrivate.ptr )
|
||||
+ ( pBox->y1 * pPixmap->devKind ) + pBox->x1,
|
||||
pPixmap->devKind ) ;
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* xf4bppRestoreAreas --
|
||||
* Function called by miRestoreAreas to actually fetch the areas to be
|
||||
* restored from the backing pixmap.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the pixmap into the screen.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
xf4bppRestoreAreas( pPixmap, prgnRestore, xorg, yorg, pWin )
|
||||
register PixmapPtr pPixmap ; /* Backing pixmap */
|
||||
RegionPtr prgnRestore ; /* Region to restore (screen-relative)*/
|
||||
int xorg ; /* X origin of window */
|
||||
int yorg ; /* Y origin of window */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register BoxPtr pBox ;
|
||||
register int nBox ;
|
||||
|
||||
TRACE( ( "xf4bppRestoreAreas(0x%x,0x%x,%d,%d)\n",
|
||||
pPixmap, prgnRestore, xorg, yorg ) ) ;
|
||||
/* WHOOP WHOOP WHOOP XXX -- depth 8 *only* */
|
||||
|
||||
if ( !( nBox = REGION_NUM_RECTS(prgnRestore) ) )
|
||||
return ;
|
||||
for ( pBox = REGION_RECTS(prgnRestore) ; nBox-- ; pBox++ )
|
||||
xf4bppDrawColorImage( pWin, pBox->x1,
|
||||
pBox->y1,
|
||||
pBox->x2 - pBox->x1,
|
||||
pBox->y2 - pBox->y1,
|
||||
( (unsigned char *)pPixmap->devPrivate.ptr )
|
||||
+ ( ( pBox->y1 - yorg ) * pPixmap->devKind )
|
||||
+ ( pBox->x1 - xorg ),
|
||||
pPixmap->devKind,
|
||||
GXcopy, VGA_ALLPLANES ) ;
|
||||
return ;
|
||||
}
|
|
@ -87,14 +87,6 @@ xf4bppNeverCalled()
|
|||
FatalError("xf4bppNeverCalled was nevertheless called\n");
|
||||
}
|
||||
|
||||
static BSFuncRec ppcBSFuncRec = {
|
||||
xf4bppSaveAreas,
|
||||
xf4bppRestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
(BackingStoreGetImagePixmapProcPtr) 0,
|
||||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
/*ARGSUSED*/
|
||||
static Bool
|
||||
vgaScreenClose
|
||||
|
@ -217,12 +209,6 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
|
|||
pScreen-> PaintWindowBorder = xf4bppPaintWindow;
|
||||
pScreen-> CopyWindow = xf4bppCopyWindow;
|
||||
pScreen-> CreatePixmap = xf4bppCreatePixmap;
|
||||
pScreen-> SaveDoomedAreas = (SaveDoomedAreasProcPtr)NoopDDA;
|
||||
pScreen-> RestoreAreas = (RestoreAreasProcPtr)NoopDDA;
|
||||
pScreen-> ExposeCopy = (ExposeCopyProcPtr)NoopDDA;
|
||||
pScreen-> TranslateBackingStore = (TranslateBackingStoreProcPtr)NoopDDA;
|
||||
pScreen-> ClearBackingStore = (ClearBackingStoreProcPtr)NoopDDA;
|
||||
pScreen-> DrawGuarantee = (DrawGuaranteeProcPtr)NoopDDA;
|
||||
pScreen-> CreateGC = xf4bppCreateGC;
|
||||
pScreen-> CreateColormap = xf4bppInitializeColormap;
|
||||
pScreen-> DestroyColormap = (DestroyColormapProcPtr)NoopDDA;
|
||||
|
@ -240,7 +226,6 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
|
|||
rootdepth, ndepths, depths, defaultVisual /* See above */,
|
||||
nvisuals, visuals))
|
||||
return FALSE;
|
||||
pScreen->BackingStoreFuncs = ppcBSFuncRec;
|
||||
|
||||
/* GJA -- Now we override the supplied default: */
|
||||
pScreen -> CreateScreenResources = v16CreateScreenResources;
|
||||
|
|
|
@ -19,22 +19,6 @@ void xf4bppFillArea(
|
|||
GCPtr
|
||||
);
|
||||
|
||||
/* ppcBStore.c */
|
||||
void xf4bppSaveAreas(
|
||||
PixmapPtr,
|
||||
RegionPtr,
|
||||
int,
|
||||
int,
|
||||
WindowPtr
|
||||
);
|
||||
void xf4bppRestoreAreas(
|
||||
PixmapPtr,
|
||||
RegionPtr,
|
||||
int,
|
||||
int,
|
||||
WindowPtr
|
||||
);
|
||||
|
||||
/* ppcClip.c */
|
||||
void xf4bppDestroyClip(
|
||||
GCPtr
|
||||
|
|
|
@ -9,7 +9,6 @@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
|
|||
libxf8_32bpp_la_LDFLAGS = -avoid-version
|
||||
|
||||
libxf8_32bpp_la_SOURCES = \
|
||||
cfbbstore.c \
|
||||
cfbcpyarea.c \
|
||||
cfbcpyplane.c \
|
||||
cfbgcmisc.c \
|
||||
|
|
|
@ -27,24 +27,6 @@ extern int cfb8_32GetGCPrivateIndex(void);
|
|||
extern int cfb8_32ScreenPrivateIndex; /* XXX */
|
||||
extern int cfb8_32GetScreenPrivateIndex(void);
|
||||
|
||||
void
|
||||
cfb8_32SaveAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
);
|
||||
|
||||
void
|
||||
cfb8_32RestoreAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
);
|
||||
|
||||
RegionPtr
|
||||
cfb8_32CopyArea(
|
||||
DrawablePtr pSrcDraw,
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
|
||||
#define PSZ 8
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
#include "cfb.h"
|
||||
#undef PSZ
|
||||
#include "cfb32.h"
|
||||
#include "cfb8_32.h"
|
||||
#include <X11/X.h>
|
||||
#include "mibstore.h"
|
||||
#include "regionstr.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
|
||||
void
|
||||
cfb8_32SaveAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
PixmapPtr pScrPix;
|
||||
|
||||
if(pPixmap->drawable.bitsPerPixel == 32) {
|
||||
cfb32SaveAreas(pPixmap, prgnSave, xorg, yorg, pWin);
|
||||
return;
|
||||
}
|
||||
|
||||
i = REGION_NUM_RECTS(prgnSave);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i * sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnSave);
|
||||
pPt = pPtsInit;
|
||||
while (--i >= 0) {
|
||||
pPt->x = pBox->x1 + xorg;
|
||||
pPt->y = pBox->y1 + yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
pScrPix = (PixmapPtr) pScreen->devPrivate;
|
||||
|
||||
cfbDoBitblt32To8((DrawablePtr) pScrPix, (DrawablePtr)pPixmap,
|
||||
GXcopy, prgnSave, pPtsInit, ~0L);
|
||||
|
||||
DEALLOCATE_LOCAL (pPtsInit);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cfb8_32RestoreAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
){
|
||||
DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
PixmapPtr pScrPix;
|
||||
|
||||
i = REGION_NUM_RECTS(prgnRestore);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i*sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnRestore);
|
||||
pPt = pPtsInit;
|
||||
while (--i >= 0) {
|
||||
pPt->x = pBox->x1 - xorg;
|
||||
pPt->y = pBox->y1 - yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
pScrPix = (PixmapPtr) pScreen->devPrivate;
|
||||
|
||||
if(pPixmap->drawable.bitsPerPixel == 32) {
|
||||
if(pWin->drawable.depth == 24)
|
||||
cfb32DoBitbltCopy((DrawablePtr)pPixmap, (DrawablePtr) pScrPix,
|
||||
GXcopy, prgnRestore, pPtsInit, 0x00ffffff);
|
||||
else
|
||||
cfb32DoBitbltCopy((DrawablePtr)pPixmap, (DrawablePtr) pScrPix,
|
||||
GXcopy, prgnRestore, pPtsInit, ~0);
|
||||
} else {
|
||||
cfbDoBitblt8To32((DrawablePtr)pPixmap, (DrawablePtr) pScrPix,
|
||||
GXcopy, prgnRestore, pPtsInit, ~0L);
|
||||
}
|
||||
|
||||
DEALLOCATE_LOCAL (pPtsInit);
|
||||
}
|
|
@ -31,15 +31,6 @@
|
|||
/* CAUTION: We require that cfb8 and cfb32 were NOT
|
||||
compiled with CFB_NEED_SCREEN_PRIVATE */
|
||||
|
||||
static BSFuncRec cfb8_32BSFuncRec = {
|
||||
cfb8_32SaveAreas,
|
||||
cfb8_32RestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
(BackingStoreGetImagePixmapProcPtr) 0,
|
||||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
|
||||
int cfb8_32GCPrivateIndex;
|
||||
int cfb8_32GetGCPrivateIndex(void) { return cfb8_32GCPrivateIndex; }
|
||||
int cfb8_32ScreenPrivateIndex;
|
||||
|
@ -220,7 +211,6 @@ cfb8_32FinishScreenInit(
|
|||
defaultVisual, nvisuals, visuals))
|
||||
return FALSE;
|
||||
|
||||
pScreen->BackingStoreFuncs = cfb8_32BSFuncRec;
|
||||
pScreen->CreateScreenResources = cfb8_32CreateScreenResources;
|
||||
pScreen->CloseScreen = cfb8_32CloseScreen;
|
||||
pScreen->GetScreenPixmap = cfb32GetScreenPixmap; /* OK */
|
||||
|
|
|
@ -48,7 +48,6 @@ libxgl_a_SOURCES = \
|
|||
xglcopy.c \
|
||||
xglfill.c \
|
||||
xglwindow.c \
|
||||
xglbstore.c \
|
||||
xglget.c \
|
||||
xglgc.c \
|
||||
xglshm.c \
|
||||
|
|
19
hw/xgl/xgl.h
19
hw/xgl/xgl.h
|
@ -293,8 +293,6 @@ typedef struct _xglScreen {
|
|||
RealizeGlyphProcPtr RealizeGlyph;
|
||||
UnrealizeGlyphProcPtr UnrealizeGlyph;
|
||||
#endif
|
||||
|
||||
BSFuncRec BackingStoreFuncs;
|
||||
} xglScreenRec, *xglScreenPtr;
|
||||
|
||||
extern int xglScreenPrivateIndex;
|
||||
|
@ -1110,23 +1108,6 @@ xglSetWindowPixmap (WindowPtr pWin,
|
|||
PixmapPtr pPixmap);
|
||||
|
||||
|
||||
/* xglbstore.c */
|
||||
|
||||
void
|
||||
xglSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
void
|
||||
xglRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin);
|
||||
|
||||
|
||||
/* xglget.c */
|
||||
|
||||
void
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
/*
|
||||
* Copyright © 2004 David Reveman
|
||||
*
|
||||
* 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, and that the name of
|
||||
* David Reveman not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior permission.
|
||||
* David Reveman makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL DAVID REVEMAN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: David Reveman <davidr@novell.com>
|
||||
*/
|
||||
|
||||
#include "xgl.h"
|
||||
|
||||
#define XGL_BSTORE_FALLBACK_PROLOGUE(pDrawable, func) \
|
||||
xglSyncDamageBoxBits (pDrawable); \
|
||||
XGL_SCREEN_UNWRAP (func)
|
||||
|
||||
#define XGL_BSTORE_FALLBACK_EPILOGUE(pDrawable, func, xglfunc) \
|
||||
XGL_SCREEN_WRAP (func, xglfunc); \
|
||||
xglAddCurrentSurfaceDamage (pDrawable)
|
||||
|
||||
/*
|
||||
* The follwong functions are not yet tested so we can assume that they
|
||||
* are both broken.
|
||||
*/
|
||||
|
||||
void
|
||||
xglSaveAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
BoxRec box;
|
||||
|
||||
XGL_SCREEN_PRIV (pScreen);
|
||||
XGL_PIXMAP_PRIV (pPixmap);
|
||||
|
||||
box = *(REGION_EXTENTS (pScreen, prgnSave));
|
||||
|
||||
pPixmapPriv->damageBox = box;
|
||||
|
||||
if (xglCopy (&pWin->drawable,
|
||||
&pPixmap->drawable,
|
||||
xorg, yorg,
|
||||
REGION_RECTS (prgnSave),
|
||||
REGION_NUM_RECTS (prgnSave)))
|
||||
{
|
||||
xglAddCurrentBitDamage (&pPixmap->drawable);
|
||||
return;
|
||||
}
|
||||
|
||||
box.x1 += xorg;
|
||||
box.y1 += yorg;
|
||||
box.x2 += xorg;
|
||||
box.y2 += yorg;
|
||||
|
||||
if (!xglSyncBits (&pWin->drawable, &box))
|
||||
FatalError (XGL_SW_FAILURE_STRING);
|
||||
|
||||
XGL_BSTORE_FALLBACK_PROLOGUE (&pPixmap->drawable,
|
||||
BackingStoreFuncs.SaveAreas);
|
||||
(*pScreen->BackingStoreFuncs.SaveAreas) (pPixmap, prgnSave,
|
||||
xorg, yorg, pWin);
|
||||
XGL_BSTORE_FALLBACK_EPILOGUE (&pPixmap->drawable,
|
||||
BackingStoreFuncs.SaveAreas,
|
||||
xglSaveAreas);
|
||||
}
|
||||
|
||||
void
|
||||
xglRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
BoxPtr pExt;
|
||||
BoxRec box;
|
||||
|
||||
XGL_SCREEN_PRIV (pScreen);
|
||||
|
||||
if (xglCopy (&pPixmap->drawable,
|
||||
&pWin->drawable,
|
||||
-xorg, -yorg,
|
||||
REGION_RECTS (prgnRestore),
|
||||
REGION_NUM_RECTS (prgnRestore)))
|
||||
{
|
||||
xglAddCurrentBitDamage (&pPixmap->drawable);
|
||||
return;
|
||||
}
|
||||
|
||||
pExt = REGION_EXTENTS (pScreen, prgnRestore);
|
||||
|
||||
box.x1 = pExt->x1 - xorg;
|
||||
box.y1 = pExt->y1 - yorg;
|
||||
box.x2 = pExt->x2 - xorg;
|
||||
box.y2 = pExt->y2 - yorg;
|
||||
|
||||
if (!xglSyncBits (&pPixmap->drawable, &box))
|
||||
FatalError (XGL_SW_FAILURE_STRING);
|
||||
|
||||
XGL_BSTORE_FALLBACK_PROLOGUE (&pWin->drawable,
|
||||
BackingStoreFuncs.RestoreAreas);
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas) (pPixmap, prgnRestore,
|
||||
xorg, yorg, pWin);
|
||||
XGL_BSTORE_FALLBACK_EPILOGUE (&pWin->drawable,
|
||||
BackingStoreFuncs.RestoreAreas,
|
||||
xglRestoreAreas);
|
||||
}
|
|
@ -76,7 +76,7 @@ xglSetRootClip (ScreenPtr pScreen,
|
|||
WindowPtr pChild;
|
||||
Bool wasViewable;
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = 0, bsExposed;
|
||||
RegionPtr pOldClip = 0;
|
||||
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
|
@ -141,12 +141,6 @@ xglSetRootClip (ScreenPtr pScreen,
|
|||
|
||||
if (wasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE (pScreen, NullBox, 1);
|
||||
REGION_COPY (pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
if (pWin->firstChild)
|
||||
{
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild,
|
||||
|
@ -168,34 +162,6 @@ xglSetRootClip (ScreenPtr pScreen,
|
|||
(*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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
|
||||
if (valExposed)
|
||||
REGION_EMPTY (pScreen, valExposed);
|
||||
|
||||
REGION_DESTROY (pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
|
||||
if (wasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
|
|
@ -253,9 +253,6 @@ xglScreenInit (ScreenPtr pScreen)
|
|||
}
|
||||
#endif
|
||||
|
||||
XGL_SCREEN_WRAP (BackingStoreFuncs.SaveAreas, xglSaveAreas);
|
||||
XGL_SCREEN_WRAP (BackingStoreFuncs.RestoreAreas, xglRestoreAreas);
|
||||
|
||||
if (!fbCreateDefColormap (pScreen))
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -304,15 +304,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
|||
pScreen->CreatePixmap = xnestCreatePixmap;
|
||||
pScreen->DestroyPixmap = xnestDestroyPixmap;
|
||||
|
||||
/* Backing store procedures */
|
||||
|
||||
pScreen->SaveDoomedAreas = NULL;
|
||||
pScreen->RestoreAreas = NULL;
|
||||
pScreen->ExposeCopy = NULL;
|
||||
pScreen->TranslateBackingStore = NULL;
|
||||
pScreen->ClearBackingStore = NULL;
|
||||
pScreen->DrawGuarantee = NULL;
|
||||
|
||||
/* Font procedures */
|
||||
|
||||
pScreen->RealizeFont = xnestRealizeFont;
|
||||
|
|
|
@ -333,14 +333,6 @@ PclPaintWindow(
|
|||
newValues[ABSY] = (pointer)0;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX Backing store is turned off for the PCL driver
|
||||
|
||||
if (pWin->backStorage)
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC,
|
||||
GuaranteeVisBack);
|
||||
*/
|
||||
|
||||
mask = gcmask;
|
||||
gcmask = 0;
|
||||
i = 0;
|
||||
|
@ -420,14 +412,6 @@ PclPaintWindow(
|
|||
(*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect);
|
||||
DEALLOCATE_LOCAL(prect);
|
||||
|
||||
/*
|
||||
* XXX Backing store is turned off for the PCL driver
|
||||
|
||||
if (pWin->backStorage)
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC,
|
||||
GuaranteeNothing);
|
||||
*/
|
||||
|
||||
if (what == PW_BORDER)
|
||||
{
|
||||
REGION_UNINIT(pScreen, &pWin->clipList);
|
||||
|
|
|
@ -340,13 +340,6 @@ PsPaintWindow(
|
|||
newValues[ABSY] = (pointer)0;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX Backing store is turned off for the PS driver
|
||||
|
||||
if( pWin->backStorage )
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack);
|
||||
*/
|
||||
|
||||
mask = gcmask;
|
||||
gcmask = 0;
|
||||
i = 0;
|
||||
|
@ -433,13 +426,6 @@ PsPaintWindow(
|
|||
(*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect);
|
||||
DEALLOCATE_LOCAL(prect);
|
||||
|
||||
/*
|
||||
* XXX Backing store is turned off for the PS driver
|
||||
|
||||
if( pWin->backStorage )
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeNothing);
|
||||
*/
|
||||
|
||||
if( what==PW_BORDER )
|
||||
{
|
||||
REGION_UNINIT(pScreen, &pWin->clipList);
|
||||
|
|
|
@ -336,13 +336,6 @@ winFinishScreenInitFB (int index,
|
|||
/* Place our save screen function */
|
||||
pScreen->SaveScreen = winSaveScreen;
|
||||
|
||||
/* Backing store functions */
|
||||
/*
|
||||
* FIXME: Backing store support still doesn't seem to be working.
|
||||
*/
|
||||
pScreen->BackingStoreFuncs.SaveAreas = fbSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = fbRestoreAreas;
|
||||
|
||||
/* Finish fb initialization */
|
||||
if (!fbFinishScreenInit (pScreen,
|
||||
pScreenInfo->pfb,
|
||||
|
|
|
@ -45,13 +45,11 @@ 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_ */
|
||||
|
|
|
@ -17,7 +17,7 @@ libmfb_la_SOURCES = mfbgc.c mfbwindow.c mfbfont.c \
|
|||
mfbpushpxl.c mfbzerarc.c mfbfillarc.c \
|
||||
mfbfillsp.c mfbsetsp.c mfbscrinit.c mfbscrclse.c mfbclip.c \
|
||||
mfbbitblt.c mfbgetsp.c mfbpolypnt.c \
|
||||
mfbcmap.c mfbmisc.c mfbbstore.c $(libmfb_gen_sources)
|
||||
mfbcmap.c mfbmisc.c $(libmfb_gen_sources)
|
||||
|
||||
EXTRA_DIST = maskbits.h mergerop.h fastblt.h mfbline.c mfbblt.c mfbtile.c \
|
||||
mfbplygblt.c mfbimggblt.c mfbpntarea.c mfbtegblt.c mfbply1rct.c
|
||||
|
|
16
mfb/mfb.h
16
mfb/mfb.h
|
@ -205,23 +205,7 @@ extern void mfbBresD(
|
|||
int /*e2*/,
|
||||
int /*len*/
|
||||
);
|
||||
/* mfbbstore.c */
|
||||
|
||||
extern void mfbSaveAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnSave*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
|
||||
extern void mfbRestoreAreas(
|
||||
PixmapPtr /*pPixmap*/,
|
||||
RegionPtr /*prgnRestore*/,
|
||||
int /*xorg*/,
|
||||
int /*yorg*/,
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
/* mfbclip.c */
|
||||
|
||||
extern RegionPtr mfbPixmapToRegion(
|
||||
|
|
154
mfb/mfbbstore.c
154
mfb/mfbbstore.c
|
@ -1,154 +0,0 @@
|
|||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
||||
/*
|
||||
|
||||
Copyright 1987, 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 "mfb.h"
|
||||
#include <X11/X.h>
|
||||
#include "mibstore.h"
|
||||
#include "regionstr.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* mfbSaveAreas --
|
||||
* Function called by miSaveAreas to actually fetch the areas to be
|
||||
* saved into the backing pixmap. This is very simple to do, since
|
||||
* mfbDoBitblt is designed for this very thing. The region to save is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the screen
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the screen into the pixmap.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
mfbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnSave; /* Region to save (pixmap-relative) */
|
||||
int xorg; /* X origin of region */
|
||||
int yorg; /* Y origin of region */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int numRects;
|
||||
|
||||
numRects = REGION_NUM_RECTS(prgnSave);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects * sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnSave);
|
||||
pPt = pPtsInit;
|
||||
while (numRects--)
|
||||
{
|
||||
pPt->x = pBox->x1 + xorg;
|
||||
pPt->y = pBox->y1 + yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
mfbDoBitblt((DrawablePtr)pPixmap->drawable.pScreen->devPrivate,
|
||||
(DrawablePtr)pPixmap,
|
||||
GXcopy,
|
||||
prgnSave,
|
||||
pPtsInit);
|
||||
|
||||
DEALLOCATE_LOCAL(pPtsInit);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* mfbRestoreAreas --
|
||||
* Function called by miRestoreAreas to actually fetch the areas to be
|
||||
* restored from the backing pixmap. This is very simple to do, since
|
||||
* mfbDoBitblt is designed for this very thing. The region to restore is
|
||||
* already destination-relative and we're given the offset to the
|
||||
* window origin, so we have only to create an array of points of the
|
||||
* u.l. corners of the boxes in the region translated to the pixmap
|
||||
* coordinate system and fetch the screen pixmap out of its devPrivate
|
||||
* field....
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side Effects:
|
||||
* Data are copied from the pixmap into the screen.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
mfbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin)
|
||||
PixmapPtr pPixmap; /* Backing pixmap */
|
||||
RegionPtr prgnRestore; /* Region to restore (screen-relative)*/
|
||||
int xorg; /* X origin of window */
|
||||
int yorg; /* Y origin of window */
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register DDXPointPtr pPt;
|
||||
DDXPointPtr pPtsInit;
|
||||
register BoxPtr pBox;
|
||||
register int numRects;
|
||||
|
||||
numRects = REGION_NUM_RECTS(prgnRestore);
|
||||
pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(numRects*sizeof(DDXPointRec));
|
||||
if (!pPtsInit)
|
||||
return;
|
||||
|
||||
pBox = REGION_RECTS(prgnRestore);
|
||||
pPt = pPtsInit;
|
||||
while (numRects--)
|
||||
{
|
||||
pPt->x = pBox->x1 - xorg;
|
||||
pPt->y = pBox->y1 - yorg;
|
||||
pPt++;
|
||||
pBox++;
|
||||
}
|
||||
|
||||
mfbDoBitblt((DrawablePtr)pPixmap,
|
||||
(DrawablePtr)pPixmap->drawable.pScreen->devPrivate,
|
||||
GXcopy,
|
||||
prgnRestore,
|
||||
pPtsInit);
|
||||
|
||||
DEALLOCATE_LOCAL(pPtsInit);
|
||||
}
|
|
@ -89,16 +89,6 @@ static DepthRec depth = {
|
|||
1, 1, &VID
|
||||
};
|
||||
|
||||
|
||||
BSFuncRec mfbBSFuncRec = {
|
||||
mfbSaveAreas,
|
||||
mfbRestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
(BackingStoreGetImagePixmapProcPtr) 0,
|
||||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
|
||||
Bool
|
||||
mfbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
|
||||
ScreenPtr pScreen;
|
||||
|
@ -169,7 +159,6 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
|||
if (!miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||
1, 1, &depth, VID, 1, &visual))
|
||||
return FALSE;
|
||||
pScreen->BackingStoreFuncs = mfbBSFuncRec;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
118
mi/mibank.c
118
mi/mibank.c
|
@ -124,7 +124,6 @@ typedef struct _miBankScreen
|
|||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
BSFuncRec BackingStoreFuncs;
|
||||
} miBankScreenRec, *miBankScreenPtr;
|
||||
|
||||
typedef struct _miBankGC
|
||||
|
@ -1716,7 +1715,6 @@ miBankCloseScreen(
|
|||
SCREEN_UNWRAP(PaintWindowBackground);
|
||||
SCREEN_UNWRAP(PaintWindowBorder);
|
||||
SCREEN_UNWRAP(CopyWindow);
|
||||
SCREEN_UNWRAP(BackingStoreFuncs);
|
||||
|
||||
Xfree(pScreenPriv);
|
||||
return (*pScreen->CloseScreen)(nIndex, pScreen);
|
||||
|
@ -2054,114 +2052,6 @@ miBankCopyWindow(
|
|||
DEALLOCATE_LOCAL(pBoxNew1);
|
||||
}
|
||||
|
||||
/**************************
|
||||
* Backing store wrappers *
|
||||
**************************/
|
||||
|
||||
static void
|
||||
miBankSaveAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnSave,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
RegionRec rgnClipped;
|
||||
int i;
|
||||
|
||||
SCREEN_INIT;
|
||||
SCREEN_SAVE;
|
||||
SCREEN_UNWRAP(BackingStoreFuncs.SaveAreas);
|
||||
|
||||
if (!IS_BANKED(pWin))
|
||||
{
|
||||
(*pScreen->BackingStoreFuncs.SaveAreas)(pPixmap, prgnSave, xorg, yorg,
|
||||
pWin);
|
||||
}
|
||||
else
|
||||
{
|
||||
REGION_NULL(pScreen, &rgnClipped);
|
||||
REGION_TRANSLATE(pScreen, prgnSave, xorg, yorg);
|
||||
|
||||
for (i = 0; i < pScreenPriv->nBanks; i++)
|
||||
{
|
||||
if (!pScreenPriv->pBanks[i])
|
||||
continue;
|
||||
|
||||
REGION_INTERSECT(pScreen, &rgnClipped,
|
||||
prgnSave, pScreenPriv->pBanks[i]);
|
||||
|
||||
if (REGION_NIL(&rgnClipped))
|
||||
continue;
|
||||
|
||||
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
|
||||
|
||||
REGION_TRANSLATE(pScreen, &rgnClipped, -xorg, -yorg);
|
||||
|
||||
(*pScreen->BackingStoreFuncs.SaveAreas)(pPixmap, &rgnClipped,
|
||||
xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
REGION_TRANSLATE(pScreen, prgnSave, -xorg, -yorg);
|
||||
REGION_UNINIT(pScreen, &rgnClipped);
|
||||
}
|
||||
|
||||
SCREEN_WRAP(BackingStoreFuncs.SaveAreas, miBankSaveAreas);
|
||||
SCREEN_RESTORE;
|
||||
}
|
||||
|
||||
static void
|
||||
miBankRestoreAreas(
|
||||
PixmapPtr pPixmap,
|
||||
RegionPtr prgnRestore,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWin
|
||||
)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
RegionRec rgnClipped;
|
||||
int i;
|
||||
|
||||
SCREEN_INIT;
|
||||
SCREEN_SAVE;
|
||||
SCREEN_UNWRAP(BackingStoreFuncs.RestoreAreas);
|
||||
|
||||
if (!IS_BANKED(pWin))
|
||||
{
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas)(pPixmap, prgnRestore,
|
||||
xorg, yorg, pWin);
|
||||
}
|
||||
else
|
||||
{
|
||||
REGION_NULL(pScreen, &rgnClipped);
|
||||
|
||||
for (i = 0; i < pScreenPriv->nBanks; i++)
|
||||
{
|
||||
if (!pScreenPriv->pBanks[i])
|
||||
continue;
|
||||
|
||||
REGION_INTERSECT(pScreen, &rgnClipped,
|
||||
prgnRestore, pScreenPriv->pBanks[i]);
|
||||
|
||||
if (REGION_NIL(&rgnClipped))
|
||||
continue;
|
||||
|
||||
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
|
||||
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas)(pPixmap, &rgnClipped,
|
||||
xorg, yorg, pWin);
|
||||
}
|
||||
|
||||
REGION_UNINIT(pScreen, &rgnClipped);
|
||||
}
|
||||
|
||||
SCREEN_WRAP(BackingStoreFuncs.RestoreAreas, miBankRestoreAreas);
|
||||
SCREEN_RESTORE;
|
||||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
miInitializeBanking(
|
||||
ScreenPtr pScreen,
|
||||
|
@ -2383,14 +2273,6 @@ miInitializeBanking(
|
|||
SCREEN_WRAP(PaintWindowBorder, miBankPaintWindow);
|
||||
SCREEN_WRAP(CopyWindow, miBankCopyWindow);
|
||||
|
||||
pScreenPriv->BackingStoreFuncs = pScreen->BackingStoreFuncs;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = miBankSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = miBankRestoreAreas;
|
||||
/* ??????????????????????????????????????????????????????????????
|
||||
pScreen->BackingStoreFuncs.SetClipmaskRgn = miBankSetClipmaskRgn;
|
||||
?????????????????????????????????????????????????????????????? */
|
||||
|
||||
BANK_SCRPRIVLVAL = (pointer)pScreenPriv;
|
||||
|
||||
return TRUE;
|
||||
|
|
3901
mi/mibstore.c
3901
mi/mibstore.c
File diff suppressed because it is too large
Load Diff
|
@ -11,11 +11,8 @@
|
|||
* makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without
|
||||
* express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _MIBSTORE_H
|
||||
#define _MIBSTORE_H
|
||||
|
||||
|
|
|
@ -451,8 +451,6 @@ miDCMakeGC(
|
|||
gcvals[1] = FALSE;
|
||||
pGC = CreateGC((DrawablePtr)pWin,
|
||||
GCSubwindowMode|GCGraphicsExposures, gcvals, &status);
|
||||
if (pGC && pWin->drawable.pScreen->DrawGuarantee)
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack);
|
||||
*ppGC = pGC;
|
||||
return pGC;
|
||||
}
|
||||
|
|
|
@ -255,21 +255,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
|
|||
/* now get the hidden parts of the source box*/
|
||||
REGION_SUBTRACT(pscr, &rgnExposed, &rgnExposed, prgnSrcClip);
|
||||
|
||||
if (pSrcWin && pSrcWin->backStorage)
|
||||
{
|
||||
/*
|
||||
* Copy any areas from the source backing store. Modifies
|
||||
* rgnExposed.
|
||||
*/
|
||||
(* pSrcWin->drawable.pScreen->ExposeCopy) ((WindowPtr)pSrcDrawable,
|
||||
pDstDrawable,
|
||||
pGC,
|
||||
&rgnExposed,
|
||||
srcx, srcy,
|
||||
dstx, dsty,
|
||||
plane);
|
||||
}
|
||||
|
||||
/* move them over the destination */
|
||||
REGION_TRANSLATE(pscr, &rgnExposed, dstx-srcx, dsty-srcy);
|
||||
|
||||
|
@ -307,15 +292,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
|
|||
|
||||
expBox = *REGION_EXTENTS(pscr, &rgnExposed);
|
||||
REGION_RESET(pscr, &rgnExposed, &expBox);
|
||||
/* need to clear out new areas of backing store */
|
||||
if (pWin->backStorage)
|
||||
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
|
||||
pWin,
|
||||
expBox.x1,
|
||||
expBox.y1,
|
||||
expBox.x2 - expBox.x1,
|
||||
expBox.y2 - expBox.y1,
|
||||
FALSE);
|
||||
}
|
||||
if ((pDstDrawable->type != DRAWABLE_PIXMAP) &&
|
||||
(((WindowPtr)pDstDrawable)->backgroundState != None))
|
||||
|
@ -496,18 +472,6 @@ miWindowExposures(pWin, prgn, other_exposed)
|
|||
RegionPtr prgn, other_exposed;
|
||||
{
|
||||
RegionPtr exposures = prgn;
|
||||
if (pWin->backStorage && prgn)
|
||||
/*
|
||||
* in some cases, backing store will cause a different
|
||||
* region to be exposed than needs to be repainted
|
||||
* (like when a window is mapped). RestoreAreas is
|
||||
* allowed to return a region other than prgn,
|
||||
* in which case this routine will free the resultant
|
||||
* region. If exposures is null, then no events will
|
||||
* be sent to the client; if prgn is empty
|
||||
* no areas will be repainted.
|
||||
*/
|
||||
exposures = (*pWin->drawable.pScreen->RestoreAreas)(pWin, prgn);
|
||||
if ((prgn && !REGION_NIL(prgn)) ||
|
||||
(exposures && !REGION_NIL(exposures)) || other_exposed)
|
||||
{
|
||||
|
@ -551,15 +515,6 @@ miWindowExposures(pWin, prgn, other_exposed)
|
|||
}
|
||||
/* PaintWindowBackground doesn't clip, so we have to */
|
||||
REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
|
||||
/* need to clear out new areas of backing store, too */
|
||||
if (pWin->backStorage)
|
||||
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
|
||||
pWin,
|
||||
box.x1 - pWin->drawable.x,
|
||||
box.y1 - pWin->drawable.y,
|
||||
box.x2 - box.x1,
|
||||
box.y2 - box.y1,
|
||||
FALSE);
|
||||
}
|
||||
if (prgn && !REGION_NIL(prgn))
|
||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, PW_BACKGROUND);
|
||||
|
@ -779,9 +734,6 @@ int what;
|
|||
pWin = pRoot;
|
||||
}
|
||||
|
||||
if (pWin->backStorage)
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack);
|
||||
|
||||
mask = gcmask;
|
||||
gcmask = 0;
|
||||
i = 0;
|
||||
|
@ -860,9 +812,6 @@ int what;
|
|||
(*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect);
|
||||
DEALLOCATE_LOCAL(prect);
|
||||
|
||||
if (pWin->backStorage)
|
||||
(*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeNothing);
|
||||
|
||||
if (usingScratchGC)
|
||||
{
|
||||
if (what == PW_BORDER)
|
||||
|
|
|
@ -1025,8 +1025,6 @@ miOverlayWindowExposures(
|
|||
RegionPtr exposures = prgn;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
if (pWin->backStorage && prgn)
|
||||
exposures = (*pScreen->RestoreAreas)(pWin, prgn);
|
||||
if ((prgn && !REGION_NIL(prgn)) ||
|
||||
(exposures && !REGION_NIL(exposures)) || other_exposed)
|
||||
{
|
||||
|
@ -1066,16 +1064,6 @@ miOverlayWindowExposures(
|
|||
REGION_INTERSECT(pScreen, prgn, prgn, &pTree->clipList);
|
||||
} else
|
||||
REGION_INTERSECT(pScreen, prgn, prgn, &pWin->clipList);
|
||||
|
||||
/* need to clear out new areas of backing store, too */
|
||||
if (pWin->backStorage)
|
||||
(void) (*pScreen->ClearBackingStore)(
|
||||
pWin,
|
||||
box.x1 - pWin->drawable.x,
|
||||
box.y1 - pWin->drawable.y,
|
||||
box.x2 - box.x1,
|
||||
box.y2 - box.y1,
|
||||
FALSE);
|
||||
}
|
||||
if (prgn && !REGION_NIL(prgn))
|
||||
(*pScreen->PaintWindowBackground)(
|
||||
|
@ -1172,7 +1160,6 @@ miOverlayResizeWindow(
|
|||
RegionPtr oldWinClip = NULL, oldWinClip2 = NULL;
|
||||
RegionPtr borderVisible = NullRegion;
|
||||
RegionPtr borderVisible2 = NullRegion;
|
||||
RegionPtr bsExposed = NullRegion; /* backing store exposures */
|
||||
Bool shrunk = FALSE; /* shrunk in an inner dimension */
|
||||
Bool moved = FALSE; /* window position changed */
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -1299,8 +1286,6 @@ miOverlayResizeWindow(
|
|||
|
||||
if (WasViewable) {
|
||||
pRegion = REGION_CREATE(pScreen, NullBox, 1);
|
||||
if (pWin->backStorage)
|
||||
REGION_COPY(pScreen, pRegion, &pWin->clipList);
|
||||
|
||||
(*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, NULL);
|
||||
|
||||
|
@ -1326,17 +1311,6 @@ miOverlayResizeWindow(
|
|||
|
||||
GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny);
|
||||
|
||||
if (pWin->backStorage && ((pWin->backingStore == Always) || WasViewable)) {
|
||||
if (!WasViewable)
|
||||
pRegion = &pWin->clipList; /* a convenient empty region */
|
||||
if (pWin->bitGravity == ForgetGravity)
|
||||
bsExposed = (*pScreen->TranslateBackingStore)
|
||||
(pWin, 0, 0, NullRegion, oldx, oldy);
|
||||
else
|
||||
bsExposed = (*pScreen->TranslateBackingStore)
|
||||
(pWin, nx - x, ny - y, pRegion, oldx, oldy);
|
||||
}
|
||||
|
||||
if (WasViewable) {
|
||||
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||
miOverlayTwoRegions TwoRegions;
|
||||
|
@ -1544,16 +1518,6 @@ miOverlayResizeWindow(
|
|||
REGION_DESTROY(pScreen, destClip);
|
||||
if (destClip2)
|
||||
REGION_DESTROY(pScreen, destClip2);
|
||||
if (bsExposed) {
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
(*pScreen->HandleExposures)(pWin->parent);
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
if (dosave)
|
||||
|
@ -1562,10 +1526,6 @@ miOverlayResizeWindow(
|
|||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther);
|
||||
}
|
||||
else if (bsExposed) {
|
||||
(*pScreen->WindowExposures) (pWin, NullRegion, bsExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured ();
|
||||
}
|
||||
|
@ -1577,7 +1537,7 @@ miOverlaySetShape(WindowPtr pWin)
|
|||
{
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
RegionPtr pOldClip = NULL;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -1611,11 +1571,6 @@ miOverlaySetShape(WindowPtr pWin)
|
|||
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
|
||||
|
||||
if (WasViewable) {
|
||||
if (pWin->backStorage) {
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
|
||||
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -1626,26 +1581,6 @@ miOverlaySetShape(WindowPtr pWin)
|
|||
(*pScreen->ValidateTree)(pWin->parent, 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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable) {
|
||||
(*pScreen->HandleExposures)(pWin->parent);
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -1798,10 +1733,6 @@ miOverlayClearToBackground(
|
|||
box.y1 = y1; box.y2 = y2;
|
||||
|
||||
REGION_INIT(pScreen, ®, &box, 1);
|
||||
if (pWin->backStorage) {
|
||||
pBSReg = (* pScreen->ClearBackingStore)(pWin, x, y, w, h,
|
||||
generateExposures);
|
||||
}
|
||||
|
||||
REGION_INTERSECT(pScreen, ®, ®, clipList);
|
||||
if (generateExposures)
|
||||
|
|
|
@ -89,9 +89,6 @@ static void miSpriteInstallColormap(ColormapPtr pMap);
|
|||
static void miSpriteStoreColors(ColormapPtr pMap, int ndef,
|
||||
xColorItem *pdef);
|
||||
|
||||
static void miSpriteSaveDoomedAreas(WindowPtr pWin,
|
||||
RegionPtr pObscured, int dx,
|
||||
int dy);
|
||||
static void miSpriteComputeSaved(ScreenPtr pScreen);
|
||||
|
||||
#define SCREEN_PROLOGUE(pScreen, field)\
|
||||
|
@ -195,8 +192,6 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs)
|
|||
|
||||
pScreenPriv->CopyWindow = pScreen->CopyWindow;
|
||||
|
||||
pScreenPriv->SaveDoomedAreas = pScreen->SaveDoomedAreas;
|
||||
|
||||
pScreenPriv->InstallColormap = pScreen->InstallColormap;
|
||||
pScreenPriv->StoreColors = pScreen->StoreColors;
|
||||
|
||||
|
@ -228,8 +223,6 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs)
|
|||
|
||||
pScreen->CopyWindow = miSpriteCopyWindow;
|
||||
|
||||
pScreen->SaveDoomedAreas = miSpriteSaveDoomedAreas;
|
||||
|
||||
pScreen->InstallColormap = miSpriteInstallColormap;
|
||||
pScreen->StoreColors = miSpriteStoreColors;
|
||||
|
||||
|
@ -264,7 +257,6 @@ miSpriteCloseScreen (i, pScreen)
|
|||
pScreen->InstallColormap = pScreenPriv->InstallColormap;
|
||||
pScreen->StoreColors = pScreenPriv->StoreColors;
|
||||
|
||||
pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas;
|
||||
miSpriteIsUpFALSE (pScreen, pScreenPriv);
|
||||
DamageDestroy (pScreenPriv->pDamage);
|
||||
|
||||
|
@ -557,45 +549,6 @@ miSpriteFindColors (ScreenPtr pScreen)
|
|||
pScreenPriv->checkPixels = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* BackingStore wrappers
|
||||
*/
|
||||
|
||||
static void
|
||||
miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy)
|
||||
WindowPtr pWin;
|
||||
RegionPtr pObscured;
|
||||
int dx, dy;
|
||||
{
|
||||
ScreenPtr pScreen;
|
||||
miSpriteScreenPtr pScreenPriv;
|
||||
BoxRec cursorBox;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
||||
SCREEN_PROLOGUE (pScreen, SaveDoomedAreas);
|
||||
|
||||
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
||||
if (pScreenPriv->isUp)
|
||||
{
|
||||
cursorBox = pScreenPriv->saved;
|
||||
|
||||
if (dx || dy)
|
||||
{
|
||||
cursorBox.x1 += dx;
|
||||
cursorBox.y1 += dy;
|
||||
cursorBox.x2 += dx;
|
||||
cursorBox.y2 += dy;
|
||||
}
|
||||
if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT)
|
||||
miSpriteRemoveCursor (pScreen);
|
||||
}
|
||||
|
||||
(*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy);
|
||||
|
||||
SCREEN_EPILOGUE (pScreen, SaveDoomedAreas);
|
||||
}
|
||||
|
||||
/*
|
||||
* miPointer interface routines
|
||||
*/
|
||||
|
|
|
@ -57,9 +57,6 @@ typedef struct {
|
|||
/* window procedures */
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
|
||||
/* backing store procedures */
|
||||
SaveDoomedAreasProcPtr SaveDoomedAreas;
|
||||
|
||||
/* colormap procedures */
|
||||
InstallColormapProcPtr InstallColormap;
|
||||
StoreColorsProcPtr StoreColors;
|
||||
|
|
|
@ -513,18 +513,6 @@ miComputeClips (
|
|||
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)
|
||||
{
|
||||
REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe);
|
||||
(* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
|
||||
}
|
||||
|
||||
/* HACK ALERT - copying contents of regions, instead of regions */
|
||||
{
|
||||
RegionRec tmp;
|
||||
|
@ -816,11 +804,6 @@ miValidateTree (pParent, pChild, kind)
|
|||
&totalClip, &pParent->clipList);
|
||||
/* fall through */
|
||||
case VTMap:
|
||||
if (pParent->backStorage) {
|
||||
REGION_SUBTRACT( pScreen, &exposed, &pParent->clipList, &totalClip);
|
||||
(* pScreen->SaveDoomedAreas)(pParent, &exposed, 0, 0);
|
||||
}
|
||||
|
||||
REGION_COPY( pScreen, &pParent->clipList, &totalClip);
|
||||
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
break;
|
||||
|
|
|
@ -113,18 +113,6 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
|
|||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
REGION_INIT(pScreen, ®, &box, 1);
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
/*
|
||||
* If the window has backing-store on, call through the
|
||||
* ClearToBackground vector to handle the special semantics
|
||||
* (i.e. things backing store is to be cleared out and
|
||||
* an Expose event is to be generated for those areas in backing
|
||||
* store if generateExposures is TRUE).
|
||||
*/
|
||||
pBSReg = (* pScreen->ClearBackingStore)(pWin, x, y, w, h,
|
||||
generateExposures);
|
||||
}
|
||||
|
||||
REGION_INTERSECT(pScreen, ®, ®, &pWin->clipList);
|
||||
if (generateExposures)
|
||||
|
@ -631,7 +619,6 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
RegionPtr destClip; /* portions of destination already written */
|
||||
RegionPtr oldWinClip = NULL; /* old clip list for window */
|
||||
RegionPtr borderVisible = NullRegion; /* visible area of the border */
|
||||
RegionPtr bsExposed = NullRegion; /* backing store exposures */
|
||||
Bool shrunk = FALSE; /* shrunk in an inner dimension */
|
||||
Bool moved = FALSE; /* window position changed */
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -735,8 +722,6 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
if (WasViewable)
|
||||
{
|
||||
pRegion = REGION_CREATE(pScreen, NullBox, 1);
|
||||
if (pWin->backStorage)
|
||||
REGION_COPY(pScreen, pRegion, &pWin->clipList);
|
||||
|
||||
if (pLayerWin == pWin)
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
|
||||
|
@ -769,21 +754,6 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
|
||||
GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny);
|
||||
|
||||
if (pWin->backStorage &&
|
||||
((pWin->backingStore == Always) || WasViewable))
|
||||
{
|
||||
if (!WasViewable)
|
||||
pRegion = &pWin->clipList; /* a convenient empty region */
|
||||
if (pWin->bitGravity == ForgetGravity)
|
||||
bsExposed = (*pScreen->TranslateBackingStore)
|
||||
(pWin, 0, 0, NullRegion, oldx, oldy);
|
||||
else
|
||||
{
|
||||
bsExposed = (*pScreen->TranslateBackingStore)
|
||||
(pWin, nx - x, ny - y, pRegion, oldx, oldy);
|
||||
}
|
||||
}
|
||||
|
||||
if (WasViewable)
|
||||
{
|
||||
/* avoid the border */
|
||||
|
@ -932,17 +902,6 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
REGION_DESTROY(pScreen, pRegion);
|
||||
if (destClip)
|
||||
REGION_DESTROY(pScreen, destClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
if (anyMarked)
|
||||
(*pScreen->HandleExposures)(pLayerWin->parent);
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -955,11 +914,6 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
(*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange,
|
||||
VTOther);
|
||||
}
|
||||
else if (bsExposed)
|
||||
{
|
||||
(*pScreen->WindowExposures) (pWin, NullRegion, bsExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured ();
|
||||
}
|
||||
|
@ -986,7 +940,7 @@ miSetShape(pWin)
|
|||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
RegionPtr pOldClip = NULL;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -1018,12 +972,6 @@ miSetShape(pWin)
|
|||
|
||||
if (WasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
|
||||
(WindowPtr *)NULL);
|
||||
|
||||
|
@ -1038,28 +986,6 @@ miSetShape(pWin)
|
|||
(*pScreen->ValidateTree)(pLayerWin->parent, 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)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
|
|
@ -1704,25 +1704,6 @@ static GCOps damageGCOps = {
|
|||
{NULL} /* devPrivate */
|
||||
};
|
||||
|
||||
static void
|
||||
damageRestoreAreas (PixmapPtr pPixmap,
|
||||
RegionPtr prgn,
|
||||
int xorg,
|
||||
int yorg,
|
||||
WindowPtr pWindow)
|
||||
{
|
||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
||||
damageScrPriv(pScreen);
|
||||
|
||||
damageDamageRegion (&pWindow->drawable, prgn, FALSE, -1);
|
||||
unwrap (pScrPriv, pScreen, BackingStoreFuncs.RestoreAreas);
|
||||
(*pScreen->BackingStoreFuncs.RestoreAreas) (pPixmap, prgn,
|
||||
xorg, yorg, pWindow);
|
||||
damageReportPostOp (&pWindow->drawable);
|
||||
wrap (pScrPriv, pScreen, BackingStoreFuncs.RestoreAreas,
|
||||
damageRestoreAreas);
|
||||
}
|
||||
|
||||
static void
|
||||
damageSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
|
||||
{
|
||||
|
@ -1786,7 +1767,6 @@ damageCloseScreen (int i, ScreenPtr pScreen)
|
|||
unwrap (pScrPriv, pScreen, PaintWindowBorder);
|
||||
unwrap (pScrPriv, pScreen, CopyWindow);
|
||||
unwrap (pScrPriv, pScreen, CloseScreen);
|
||||
unwrap (pScrPriv, pScreen, BackingStoreFuncs.RestoreAreas);
|
||||
xfree (pScrPriv);
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
@ -1840,8 +1820,6 @@ DamageSetup (ScreenPtr pScreen)
|
|||
wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
|
||||
wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
|
||||
wrap (pScrPriv, pScreen, CloseScreen, damageCloseScreen);
|
||||
wrap (pScrPriv, pScreen, BackingStoreFuncs.RestoreAreas,
|
||||
damageRestoreAreas);
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
wrap (pScrPriv, ps, Glyphs, damageGlyphs);
|
||||
|
|
|
@ -72,7 +72,6 @@ typedef struct _damageScrPriv {
|
|||
CompositeProcPtr Composite;
|
||||
GlyphsProcPtr Glyphs;
|
||||
#endif
|
||||
BSFuncRec BackingStoreFuncs;
|
||||
} DamageScrPrivRec, *DamageScrPrivPtr;
|
||||
|
||||
typedef struct _damageGCPriv {
|
||||
|
|
|
@ -633,7 +633,6 @@ RootlessWrap(ScreenPtr pScreen)
|
|||
#endif
|
||||
|
||||
// WRAP(ClearToBackground); fixme put this back? useful for shaped wins?
|
||||
// WRAP(RestoreAreas); fixme put this back?
|
||||
|
||||
#undef WRAP
|
||||
}
|
||||
|
|
|
@ -482,18 +482,6 @@ RootlessComputeClips (pParent, pScreen, universe, kind, exposed)
|
|||
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)
|
||||
{
|
||||
REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe);
|
||||
(* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
|
||||
}
|
||||
|
||||
/* HACK ALERT - copying contents of regions, instead of regions */
|
||||
{
|
||||
RegionRec tmp;
|
||||
|
|
Loading…
Reference in New Issue