diff options
author | Keith Packard <keithp@keithp.com> | 2004-08-07 01:23:07 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2004-08-07 01:23:07 +0000 |
commit | 1e694d2b51a954d1bc4afdde390723e9a1a5b9bf (patch) | |
tree | ba554e8ab002199ce3c12b0639432245fd70faa8 /mi/mispritest.h | |
parent | 45fde3b041c071ae5a604cefbbfa4da5c1e828f8 (diff) |
Fix minor timestamp lossage in mieq.
Replace miSprite implementation with Damage-based one. Otherwise damage and
misprite conflict causing looping.
Change pScreen usage around a bit to eliminate warnings
Diffstat (limited to 'mi/mispritest.h')
-rw-r--r-- | mi/mispritest.h | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/mi/mispritest.h b/mi/mispritest.h index e438dd7d2..7312d2476 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -32,58 +32,68 @@ in this Software without prior written authorization from The Open Group. */ /* $XFree86: xc/programs/Xserver/mi/mispritest.h,v 1.4 2001/01/17 22:37:07 dawes Exp $ */ +#ifndef _MISPRITEST_H_ +#define _MISPRITEST_H_ + # include "misprite.h" #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 (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ +} + +#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->isUp) { \ + DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ + pScreenPriv->isUp = FALSE; \ +} /* * Overlap BoxPtr and Box elements @@ -116,3 +126,5 @@ typedef struct { #define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \ BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2)) + +#endif /* _MISPRITEST_H_ */ |