Small changes to damage to match 1.4

Mostly just code cleanup... nothing "really" changing here...
This commit is contained in:
Jeremy Huddleston 2008-03-28 16:01:29 -07:00
parent 38cbd13490
commit 57308bbc9b
6 changed files with 20 additions and 60 deletions

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@ -28,12 +26,12 @@
#include "damageextint.h"
unsigned char DamageReqCode;
int DamageEventBase;
int DamageErrorBase;
int DamageClientPrivateIndex;
RESTYPE DamageExtType;
RESTYPE DamageExtWinType;
static unsigned char DamageReqCode;
static int DamageEventBase;
static int DamageErrorBase;
static int DamageClientPrivateIndex;
static RESTYPE DamageExtType;
static RESTYPE DamageExtWinType;
/* Version of the damage extension supported by the server, as opposed to the
* DAMAGE_* defines from damageproto for what version the proto header
@ -186,7 +184,7 @@ ProcDamageCreate (ClientPtr client)
REQUEST_SIZE_MATCH(xDamageCreateReq);
LEGAL_NEW_RESOURCE(stuff->damage, client);
SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client,
SecurityReadAccess);
SecurityReadAccess);
switch (stuff->level) {
case XDamageReportRawRectangles:
level = DamageReportRawRegion;
@ -311,7 +309,7 @@ static const int version_requests[] = {
#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0]))
int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
static int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
/*************** Version 1 ******************/
ProcDamageQueryVersion,
ProcDamageCreate,
@ -400,7 +398,7 @@ SProcDamageAdd (ClientPtr client)
return (*ProcDamageVector[stuff->damageReqType]) (client);
}
int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
static int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
/*************** Version 1 ******************/
SProcDamageQueryVersion,
SProcDamageCreate,
@ -470,7 +468,7 @@ FreeDamageExtWin (pointer value, XID wid)
return Success;
}
void
static void
SDamageNotifyEvent (xDamageNotifyEvent *from,
xDamageNotifyEvent *to)
{

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@ -44,13 +42,6 @@
#include "damage.h"
#include "xfixes.h"
extern unsigned char DamageReqCode;
extern int DamageEventBase;
extern int DamageErrorBase;
extern int DamageClientPrivateIndex;
extern RESTYPE DamageExtType;
extern RESTYPE DamageExtWinType;
typedef struct _DamageClient {
CARD32 major_version;
CARD32 minor_version;
@ -67,9 +58,6 @@ typedef struct _DamageExt {
XID id;
} DamageExtRec, *DamageExtPtr;
extern int (*ProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
extern int (*SProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \
pDamageExt = SecurityLookupIDByType (client, rid, DamageExtType, mode); \
if (!pDamageExt) { \
@ -78,10 +66,6 @@ extern int (*SProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
} \
}
void
SDamageNotifyEvent (xDamageNotifyEvent *from,
xDamageNotifyEvent *to);
void
DamageExtSetCritical (ClientPtr pClient, Bool critical);

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@ -72,6 +70,12 @@
#define pixmapDamage(pPixmap) damagePixPriv(pPixmap)
static int damageScrPrivateIndex;
static int damagePixPrivateIndex;
static int damageGCPrivateIndex;
static int damageWinPrivateIndex;
static int damageGeneration;
static DamagePtr *
getDrawableDamageRef (DrawablePtr pDrawable)
{
@ -368,12 +372,12 @@ static void damageChangeClip(GCPtr, int, pointer, int);
static void damageDestroyClip(GCPtr);
static void damageCopyClip(GCPtr, GCPtr);
GCFuncs damageGCFuncs = {
static GCFuncs damageGCFuncs = {
damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC,
damageChangeClip, damageDestroyClip, damageCopyClip
};
extern GCOps damageGCOps;
static GCOps damageGCOps;
static Bool
damageCreateGC(GCPtr pGC)
@ -1686,7 +1690,7 @@ damageCopyWindow(WindowPtr pWindow,
wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
}
GCOps damageGCOps = {
static GCOps damageGCOps = {
damageFillSpans, damageSetSpans,
damagePutImage, damageCopyArea,
damageCopyPlane, damagePolyPoint,
@ -1787,12 +1791,6 @@ damageCloseScreen (int i, ScreenPtr pScreen)
return (*pScreen->CloseScreen) (i, pScreen);
}
int damageScrPrivateIndex;
int damagePixPrivateIndex;
int damageGCPrivateIndex;
int damageWinPrivateIndex;
int damageGeneration;
Bool
DamageSetup (ScreenPtr pScreen)
{
@ -1831,16 +1829,6 @@ DamageSetup (ScreenPtr pScreen)
if (!pScrPriv)
return FALSE;
#ifdef COMPOSITE
/* This is a kludge to ensure wrapping order with the composite wrapper.
* If it's done from compinit.c, then DamageSetup may be called before the
* extension init phase, so that cw will be higher in the wrapping chain and
* rewrite drawables before damage gets to it, causing confusion.
*/
if (!noCompositeExtension)
miInitializeCompositeWrapper (pScreen);
#endif
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its

View file

@ -1,6 +1,4 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@ -82,11 +80,7 @@ typedef struct _damageGCPriv {
GCFuncs *funcs;
} DamageGCPrivRec, *DamageGCPrivPtr;
extern int damageScrPrivateIndex;
extern int damagePixPrivateIndex;
extern int damageGCPrivateIndex;
extern int damageWinPrivateIndex;
/* XXX should move these into damage.c, damageScrPrivateIndex is static */
#define damageGetScrPriv(pScr) \
((DamageScrPrivPtr) (pScr)->devPrivates[damageScrPrivateIndex].ptr)