[xserver-commit] xserver/mi Makefile.am,3.5,3.5.2.1 misprite.c,3.13,3.13.2.1 mispritest.h,1.6,1.6.2.1
Keith Packard
xserver-commit@pdx.freedesktop.org
Tue, 21 Oct 2003 23:00:52 -0700
Committed by: keithp
Update of /cvs/xserver/xserver/mi
In directory pdx:/tmp/cvs-serv16351/mi
Modified Files:
Tag: xfixes_2_branch
Makefile.am misprite.c mispritest.h
Log Message:
* configure.ac:
Build damage infrastructure. Don't build layer
* fb/fbcopy.c: (fbCopyNtoN), (fbCopyArea):
Move check for 24/32 copy to fbCopyNtoN so that other users will hit
it
* hw/kdrive/fbdev/Makefile.am:
* hw/kdrive/fbdev/fbdev.c: (fbdevScreenInitialize),
(fbdevGetPixmap), (fbdevPixmapSet), (fbdevRandRSetConfig),
(fbdevInitScreen), (fbdevFinishInitScreen):
* hw/kdrive/fbdev/fbdev.h:
Eliminate miext/layer
* hw/kdrive/linux/Makefile.am:
Build damage infrastructure. Don't build layer
* hw/kdrive/mach64/Makefile.am:
Build damage infrastructure. Don't build layer
* hw/kdrive/mach64/mach64.c: (mach64ScreenInit),
(mach64InitScreen), (mach64ScreenFini), (mach64CardFini):
* hw/kdrive/mach64/mach64.h:
* hw/kdrive/mach64/mach64draw.c: (mach64DrawFini):
* hw/kdrive/mach64/mach64video.c: (mach64InitVideo),
(mach64FiniVideo):
Memory leak fix of mach64c on server reset
Memory leak fix for video on server reset.
Eliminate layer
* hw/kdrive/mga/Makefile.am:
* hw/kdrive/mga/mga.c: (mgaScreenInit):
Build damage infrastructure. Don't build layer
* hw/kdrive/nvidia/Makefile.am:
* hw/kdrive/nvidia/nvidia.c: (nvidiaRandRSetConfig),
(nvidiaPreserve), (nvidiaEnable):
Build damage infrastructure. Don't build layer
* hw/kdrive/r128/Makefile.am:
* hw/kdrive/smi/Makefile.am:
Build damage infrastructure. Don't build layer
* hw/kdrive/src/Makefile.am:
Build damage infrastructure. Don't build layer
* hw/kdrive/src/kaa.c: (kaaDestroyPixmap), (kaaCreatePixmap),
(kaaPixmapIsOffscreen), (kaaGetOffscreenPixmap),
(kaaDrawableIsOffscreen), (kaaFillSpans), (kaaCopyNtoN),
(kaaPolyFillRect), (kaaSolidBoxClipped), (kaaValidateGC),
(kaaFillRegionSolid), (kaaDrawInit), (kaaDrawFini):
Don't assume windows are onscreen, use GetWindowPixmap
and test devPrivate.ptr. Make sure depth 24 pixmaps are 24bpp
when hardware format is 24bpp.
* hw/kdrive/src/kasync.c:
Get rid of debug KdAssertSync function
* hw/kdrive/src/kdrive.c: (KdCloseScreen), (KdScreenInit):
* hw/kdrive/src/kdrive.h:
* hw/kdrive/src/koffscreen.c: (KdOffscreenValidate),
(KdOffscreenAlloc), (KdOffscreenInit):
add memory_size to KdScreenInfo, eliminate off_screen_size,
fix tests to suit.
* hw/kdrive/vesa/Makefile.am:
* hw/kdrive/vesa/vesa.c: (vesaScreenInitialize), (vesaUpdateMono),
(vesaGetPixmap), (vesaMapFramebuffer), (vesaPixmapSet),
(vesaRandRSetConfig), (vesaInitScreen), (vesaFinishInitScreen),
(vesaScreenFini):
* hw/kdrive/vesa/vesa.h:
Build damage infrastructure. Don't build layer
* hw/xnest/Makefile.am:
Use damage (for software cursor, I guess)
* mi/Makefile.am:
* mi/misprite.c: (miSpriteReportDamage), (miSpriteCopyWindow):
* mi/mispritest.h:
Damage is used for software cursor
* miext/Makefile.am:
* miext/layer/Makefile.am:
* miext/layer/layerinit.c: (layerCloseScreen):
Build damage infrastructure. Don't build layer
* miext/shadow/Makefile.am:
* miext/shadow/shadow.c: (shadowRedisplay), (shadowGetImage),
(shadowCloseScreen), (shadowSetup), (shadowSet), (shadowUnset),
(shadowInit):
* miext/shadow/shadow.h:
* miext/shadow/shpacked.c: (shadowUpdatePacked):
* miext/shadow/shplanar.c: (shadowUpdatePlanar4):
* miext/shadow/shplanar8.c: (shadowUpdatePlanar4x8):
* miext/shadow/shrotate.c: (shadowUpdateRotatePacked):
* miext/shadow/shrotpack.h:
Use damage to track changes
* xfixes/xfixes.c: (XFixesResetProc):
Fix memory leak
Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/mi/Makefile.am,v
retrieving revision 3.5
retrieving revision 3.5.2.1
diff -u -d -r3.5 -r3.5.2.1
--- Makefile.am 1 Oct 2003 06:43:50 -0000 3.5
+++ Makefile.am 22 Oct 2003 06:00:50 -0000 3.5.2.1
@@ -1,5 +1,6 @@
INCLUDES = \
-I$(top_srcdir)/render \
+ -I$(top_srcdir)/miext/damage \
$(XSERVER_CFLAGS)
noinst_LIBRARIES = libmi.a
Index: misprite.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/misprite.c,v
retrieving revision 3.13
retrieving revision 3.13.2.1
diff -u -d -r3.13 -r3.13.2.1
--- misprite.c 11 Sep 2003 05:12:51 -0000 3.13
+++ misprite.c 22 Oct 2003 06:00:50 -0000 3.13.2.1
@@ -54,6 +54,7 @@
#ifdef RENDER
# include "mipict.h"
#endif
+# include "damage.h"
/*
* screen wrappers
@@ -71,7 +72,9 @@
char *pdstStart);
static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y,
int width, int height);
[...1841 lines suppressed...]
int x, y;
CursorPtr pCursor;
+ DamageDrawInternal (pScreen, TRUE);
miSpriteComputeSaved (pScreen);
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
pCursor = pScreenPriv->pCursor;
@@ -2295,8 +765,11 @@
if ((*pScreenPriv->funcs->PutUpCursor) (pScreen, pCursor, x, y,
pScreenPriv->colors[SOURCE_COLOR].pixel,
pScreenPriv->colors[MASK_COLOR].pixel))
- pScreenPriv->isUp = TRUE;
+ {
+ miSpriteIsUpTRUE (pScreen, pScreenPriv);
+ }
}
+ DamageDrawInternal (pScreen, FALSE);
}
/*
Index: mispritest.h
===================================================================
RCS file: /cvs/xserver/xserver/mi/mispritest.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- mispritest.h 11 Sep 2003 05:12:51 -0000 1.6
+++ mispritest.h 22 Oct 2003 06:00:50 -0000 1.6.2.1
@@ -36,54 +36,61 @@
#ifdef RENDER
# include "picturestr.h"
#endif
+# include "damage.h"
/*
* per screen information
*/
typedef struct {
+ /* screen procedures */
CloseScreenProcPtr CloseScreen;
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
SourceValidateProcPtr SourceValidate;
- CreateGCProcPtr CreateGC;
- ScreenBlockHandlerProcPtr BlockHandler;
- InstallColormapProcPtr InstallColormap;
- StoreColorsProcPtr StoreColors;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+
+ /* window procedures */
CopyWindowProcPtr CopyWindow;
- ClearToBackgroundProcPtr ClearToBackground;
+
+ /* backing store procedures */
SaveDoomedAreasProcPtr SaveDoomedAreas;
- RestoreAreasProcPtr RestoreAreas;
-#ifdef RENDER
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
-#endif
+
+ /* colormap procedures */
+ InstallColormapProcPtr InstallColormap;
+ StoreColorsProcPtr StoreColors;
+
+ /* os layer procedures */
+ ScreenBlockHandlerProcPtr BlockHandler;
CursorPtr pCursor;
- int x;
+ int x; /* cursor hotspot */
int y;
- BoxRec saved;
- Bool isUp;
- Bool shouldBeUp;
- WindowPtr pCacheWin;
+ BoxRec saved; /* saved area from the screen */
+ Bool isUp; /* cursor in frame buffer */
+ Bool shouldBeUp; /* cursor should be displayed */
+ WindowPtr pCacheWin; /* window the cursor last seen in */
Bool isInCacheWin;
- Bool checkPixels;
+ Bool checkPixels; /* check colormap collision */
xColorItem colors[2];
ColormapPtr pInstalledMap;
ColormapPtr pColormap;
VisualPtr pVisual;
miSpriteCursorFuncPtr funcs;
+ DamagePtr pDamage; /* damage tracking structure */
} miSpriteScreenRec, *miSpriteScreenPtr;
#define SOURCE_COLOR 0
#define MASK_COLOR 1
-typedef struct {
- GCFuncs *wrapFuncs;
- GCOps *wrapOps;
-} miSpriteGCRec, *miSpriteGCPtr;
+#define miSpriteIsUpTRUE(pScreen, pScreenPriv) if (!pScreenPriv->isUp) { \
+ pScreenPriv->isUp = TRUE; \
+ DamageRegister (&WindowTable[pScreen->myNum]->drawable, pScreenPriv->pDamage); \
+}
+
+#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->isUp) { \
+ DamageUnregister (&WindowTable[pScreen->myNum]->drawable, pScreenPriv->pDamage); \
+ pScreenPriv->isUp = FALSE; \
+}
/*
* Overlap BoxPtr and Box elements