Static and dead code cleanup from mi/

This commit is contained in:
Adam Jackson 2007-03-25 17:56:32 -04:00
parent 62224e3972
commit af769892a9
19 changed files with 61 additions and 573 deletions

51
mi/mi.h
View File

@ -85,18 +85,6 @@ extern RegionPtr miCopyArea(
int /*yOut*/ int /*yOut*/
); );
extern void miOpqStipDrawable(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
RegionPtr /*prgnSrc*/,
MiBits * /*pbits*/,
int /*srcx*/,
int /*w*/,
int /*h*/,
int /*dstx*/,
int /*dsty*/
);
extern RegionPtr miCopyPlane( extern RegionPtr miCopyPlane(
DrawablePtr /*pSrcDrawable*/, DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/, DrawablePtr /*pDstDrawable*/,
@ -144,15 +132,6 @@ extern void miRecolorCursor(
/* midash.c */ /* midash.c */
extern miDashPtr miDashLine(
int /*npt*/,
DDXPointPtr /*ppt*/,
unsigned int /*nDash*/,
unsigned char * /*pDash*/,
unsigned int /*offset*/,
int * /*pnseg*/
);
extern void miStepDash( extern void miStepDash(
int /*dist*/, int /*dist*/,
int * /*pDashIndex*/, int * /*pDashIndex*/,
@ -326,16 +305,6 @@ extern void miPolySegment(
/* mipolytext.c */ /* mipolytext.c */
extern int miPolyText(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
char * /*chars*/,
FontEncoding /*fontEncoding*/
);
extern int miPolyText8( extern int miPolyText8(
DrawablePtr /*pDraw*/, DrawablePtr /*pDraw*/,
GCPtr /*pGC*/, GCPtr /*pGC*/,
@ -354,16 +323,6 @@ extern int miPolyText16(
unsigned short * /*chars*/ unsigned short * /*chars*/
); );
extern int miImageText(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
char * /*chars*/,
FontEncoding /*fontEncoding*/
);
extern void miImageText8( extern void miImageText8(
DrawablePtr /*pDraw*/, DrawablePtr /*pDraw*/,
GCPtr /*pGC*/, GCPtr /*pGC*/,
@ -403,10 +362,6 @@ extern Bool miRectAlloc(
int /*n*/ int /*n*/
); );
extern void miSetExtents(
RegionPtr /*pReg*/
);
extern int miFindMaxBand( extern int miFindMaxBand(
RegionPtr /*prgn*/ RegionPtr /*prgn*/
); );
@ -417,7 +372,6 @@ extern Bool miValidRegion(
); );
#endif #endif
extern Bool miRegionDataCopy(RegionPtr dst, RegionPtr src);
extern Bool miRegionBroken(RegionPtr pReg); extern Bool miRegionBroken(RegionPtr pReg);
/* miscrinit.c */ /* miscrinit.c */
@ -432,11 +386,6 @@ extern Bool miModifyPixmapHeader(
pointer /*pPixData*/ pointer /*pPixData*/
); );
extern Bool miCloseScreen(
int /*index*/,
ScreenPtr /*pScreen*/
);
extern Bool miCreateScreenResources( extern Bool miCreateScreenResources(
ScreenPtr /*pScreen*/ ScreenPtr /*pScreen*/
); );

View File

@ -425,15 +425,8 @@ static unsigned long lrustamp;
static arcCacheRec *lastCacheHit = &arcCache[0]; static arcCacheRec *lastCacheHit = &arcCache[0];
static RESTYPE cacheType; static RESTYPE cacheType;
/* static int
* External so it can be called when low on memory. miFreeArcCache (pointer data, XID id)
* Call with a zero ID in that case.
*/
/*ARGSUSED*/
int
miFreeArcCache (data, id)
pointer data;
XID id;
{ {
int k; int k;
arcCacheRec *cent; arcCacheRec *cent;
@ -3136,8 +3129,8 @@ struct finalSpanChunk {
static struct finalSpanChunk *chunks; static struct finalSpanChunk *chunks;
struct finalSpan * static struct finalSpan *
realAllocSpan () realAllocSpan (void)
{ {
struct finalSpanChunk *newChunk; struct finalSpanChunk *newChunk;
struct finalSpan *span; struct finalSpan *span;

View File

@ -400,13 +400,9 @@ miGetPlane(
* Note how the clipped out bits of the bitmap are always the background * Note how the clipped out bits of the bitmap are always the background
* color so that the stipple never causes FillRect to draw them. * color so that the stipple never causes FillRect to draw them.
*/ */
void static void
miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty) miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
DrawablePtr pDraw; MiBits *pbits, int srcx, int w, int h, int dstx, int dsty)
GCPtr pGC;
RegionPtr prgnSrc;
MiBits *pbits;
int srcx, w, h, dstx, dsty;
{ {
int oldfill, i; int oldfill, i;
unsigned long oldfg; unsigned long oldfg;

View File

@ -54,196 +54,6 @@ SOFTWARE.
static miDashPtr CheckDashStorage(miDashPtr *ppseg, int nseg, int *pnsegMax); static miDashPtr CheckDashStorage(miDashPtr *ppseg, int nseg, int *pnsegMax);
/* return a list of DashRec. there will be an extra
entry at the end holding the last point of the polyline.
this means that the code that actually draws dashes can
get a pair of points for every dash. only the point in the last
dash record is useful; the other fields are not used.
nseg is the number of segments, not the number of points.
example:
dash1.start
dash2.start
dash3.start
last-point
defines a list of segments
(dash1.pt, dash2.pt)
(dash2.pt, dash3.pt)
(dash3.pt, last-point)
and nseg == 3.
NOTE:
EVEN_DASH == ~ODD_DASH
NOTE ALSO:
miDashLines may return 0 segments, going from pt[0] to pt[0] with one dash.
*/
miDashPtr
miDashLine(npt, ppt, nDash, pDash, offset, pnseg)
int npt;
DDXPointPtr ppt;
unsigned int nDash;
unsigned char *pDash;
unsigned int offset;
int *pnseg;
{
DDXPointRec pt1, pt2;
int lenCur; /* npt used from this dash */
int lenMax; /* npt in this dash */
int iDash = 0; /* index of current dash */
int which; /* EVEN_DASH or ODD_DASH */
miDashPtr pseg; /* list of dash segments */
miDashPtr psegBase; /* start of list */
int nseg = 0; /* number of dashes so far */
int nsegMax = 0; /* num segs we can fit in this list */
int x, y, len;
int adx, ady, signdx, signdy;
int du, dv, e1, e2, e, base_e = 0;
lenCur = offset;
which = EVEN_DASH;
while(lenCur >= pDash[iDash])
{
lenCur -= pDash[iDash];
iDash++;
if (iDash >= nDash)
iDash = 0;
which = ~which;
}
lenMax = pDash[iDash];
psegBase = (miDashPtr)NULL;
pt2 = ppt[0]; /* just in case there is only one point */
while(--npt)
{
if (PtEqual(ppt[0], ppt[1]))
{
ppt++;
continue; /* no duplicated points in polyline */
}
pt1 = *ppt++;
pt2 = *ppt;
adx = pt2.x - pt1.x;
ady = pt2.y - pt1.y;
signdx = sign(adx);
signdy = sign(ady);
adx = abs(adx);
ady = abs(ady);
if (adx > ady)
{
du = adx;
dv = ady;
len = adx;
}
else
{
du = ady;
dv = adx;
len = ady;
}
e1 = dv * 2;
e2 = e1 - 2*du;
e = e1 - du;
x = pt1.x;
y = pt1.y;
nseg++;
pseg = CheckDashStorage(&psegBase, nseg, &nsegMax);
if (!pseg)
return (miDashPtr)NULL;
pseg->pt = pt1;
pseg->e1 = e1;
pseg->e2 = e2;
base_e = pseg->e = e;
pseg->which = which;
pseg->newLine = 1;
while (len--)
{
if (adx > ady)
{
/* X_AXIS */
if (((signdx > 0) && (e < 0)) ||
((signdx <=0) && (e <=0))
)
{
e += e1;
}
else
{
y += signdy;
e += e2;
}
x += signdx;
}
else
{
/* Y_AXIS */
if (((signdx > 0) && (e < 0)) ||
((signdx <=0) && (e <=0))
)
{
e +=e1;
}
else
{
x += signdx;
e += e2;
}
y += signdy;
}
lenCur++;
if (lenCur >= lenMax && (len || npt <= 1))
{
nseg++;
pseg = CheckDashStorage(&psegBase, nseg, &nsegMax);
if (!pseg)
return (miDashPtr)NULL;
pseg->pt.x = x;
pseg->pt.y = y;
pseg->e1 = e1;
pseg->e2 = e2;
pseg->e = e;
which = ~which;
pseg->which = which;
pseg->newLine = 0;
/* move on to next dash */
iDash++;
if (iDash >= nDash)
iDash = 0;
lenMax = pDash[iDash];
lenCur = 0;
}
} /* while len-- */
} /* while --npt */
if (lenCur == 0 && nseg != 0)
{
nseg--;
which = ~which;
}
*pnseg = nseg;
pseg = CheckDashStorage(&psegBase, nseg+1, &nsegMax);
if (!pseg)
return (miDashPtr)NULL;
pseg->pt = pt2;
pseg->e = base_e;
pseg->which = which;
pseg->newLine = 0;
return psegBase;
}
#define NSEGDELTA 16 #define NSEGDELTA 16
/* returns a pointer to the pseg[nseg-1], growing the storage as /* returns a pointer to the pseg[nseg-1], growing the storage as
@ -251,8 +61,7 @@ necessary. this interface seems unnecessarily cumbersome.
*/ */
static static miDashPtr
miDashPtr
CheckDashStorage( CheckDashStorage(
miDashPtr *ppseg, /* base pointer */ miDashPtr *ppseg, /* base pointer */
int nseg, /* number of segment we want to write to */ int nseg, /* number of segment we want to write to */

View File

@ -107,10 +107,8 @@ miFillArcSetup(arc, info)
} }
} }
void static void
miFillArcDSetup(arc, info) miFillArcDSetup(xArc *arc, miFillArcDRec *info)
xArc *arc;
miFillArcDRec *info;
{ {
/* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */ /* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */
/* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */ /* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */
@ -188,15 +186,9 @@ miGetArcEdge(
} }
} }
void static void
miEllipseAngleToSlope (angle, width, height, dxp, dyp, d_dxp, d_dyp) miEllipseAngleToSlope (int angle, int width, int height, int *dxp, int *dyp,
int angle; double *d_dxp, double *d_dyp)
int width;
int height;
int *dxp;
int *dyp;
double *d_dxp;
double *d_dyp;
{ {
int dx, dy; int dx, dy;
double d_dx, d_dy, scale; double d_dx, d_dy, scale;

View File

@ -176,35 +176,11 @@ typedef struct _miArcSlice {
#define miFillInArcLower(slw) (((iny + dy) != 0) && \ #define miFillInArcLower(slw) (((iny + dy) != 0) && \
((slw > 1) || (ine != inxk))) ((slw > 1) || (ine != inxk)))
extern int miFreeArcCache(
pointer /*data*/,
XID /*id*/
);
extern struct finalSpan *realAllocSpan(
void
);
extern void miFillArcSetup( extern void miFillArcSetup(
xArc * /*arc*/, xArc * /*arc*/,
miFillArcRec * /*info*/ miFillArcRec * /*info*/
); );
extern void miFillArcDSetup(
xArc * /*arc*/,
miFillArcDRec * /*info*/
);
extern void miEllipseAngleToSlope(
int /*angle*/,
int /*width*/,
int /*height*/,
int * /*dxp*/,
int * /*dyp*/,
double * /*d_dxp*/,
double * /*d_dyp*/
);
extern void miFillArcSliceSetup( extern void miFillArcSliceSetup(
xArc * /*arc*/, xArc * /*arc*/,
miArcSliceRec * /*slice*/, miArcSliceRec * /*slice*/,

View File

@ -1,8 +1,3 @@
/*
* mipointer.c
*/
/* /*
Copyright 1989, 1998 The Open Group Copyright 1989, 1998 The Open Group
@ -409,6 +404,27 @@ miPointerAbsoluteCursor (int x, int y, unsigned long time)
miPointerSetPosition(inputInfo.pointer, &x, &y, time); miPointerSetPosition(inputInfo.pointer, &x, &y, time);
} }
/* Move the pointer on the current screen, and update the sprite. */
static void
miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
unsigned long time)
{
SetupScreen(pScreen);
if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) &&
!pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen)
{
miPointer.devx = x;
miPointer.devy = y;
if(!miPointer.pCursor->bits->emptyMask)
(*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y);
}
miPointer.x = x;
miPointer.y = y;
miPointer.pScreen = pScreen;
}
_X_EXPORT void _X_EXPORT void
miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time)
{ {
@ -499,24 +515,3 @@ miPointerMove (ScreenPtr pScreen, int x, int y, unsigned long time)
for (i = 0; i < nevents; i++) for (i = 0; i < nevents; i++)
mieqEnqueue(inputInfo.pointer, &events[i]); mieqEnqueue(inputInfo.pointer, &events[i]);
} }
/* Move the pointer on the current screen, and update the sprite. */
void
miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
unsigned long time)
{
SetupScreen(pScreen);
if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) &&
!pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen)
{
miPointer.devx = x;
miPointer.devy = y;
if(!miPointer.pCursor->bits->emptyMask)
(*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y);
}
miPointer.x = x;
miPointer.y = y;
miPointer.pScreen = pScreen;
}

View File

@ -1,9 +1,3 @@
/*
* mipointer.h
*
*/
/* /*
Copyright 1989, 1998 The Open Group Copyright 1989, 1998 The Open Group
@ -172,15 +166,6 @@ extern void miPointerSetPosition(
extern void miPointerUpdateSprite( extern void miPointerUpdateSprite(
DeviceIntPtr pDev); DeviceIntPtr pDev);
/* Moves the sprite to x, y on the current screen, and updates the event
* history. */
extern void miPointerMoved(
DeviceIntPtr pDev,
ScreenPtr pScreen,
int x,
int y,
unsigned long time);
extern int miPointerScreenIndex; extern int miPointerScreenIndex;
#endif /* MIPOINTER_H */ #endif /* MIPOINTER_H */

View File

@ -180,14 +180,6 @@ typedef struct _ScanLineListBlock {
/* mipolyutil.c */ /* mipolyutil.c */
extern Bool miInsertEdgeInET(
EdgeTable * /*ET*/,
EdgeTableEntry * /*ETE*/,
int /*scanline*/,
ScanLineListBlock ** /*SLLBlock*/,
int * /*iSLLBlock*/
);
extern Bool miCreateETandAET( extern Bool miCreateETandAET(
int /*count*/, int /*count*/,
DDXPointPtr /*pts*/, DDXPointPtr /*pts*/,

View File

@ -66,30 +66,6 @@ SOFTWARE.
#include "dixfontstr.h" #include "dixfontstr.h"
#include "mi.h" #include "mi.h"
int
miPolyText(pDraw, pGC, x, y, count, chars, fontEncoding)
DrawablePtr pDraw;
GCPtr pGC;
int x, y;
int count;
char *chars;
FontEncoding fontEncoding;
{
unsigned long n, i;
int w;
CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */
GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)chars,
fontEncoding, &n, charinfo);
w = 0;
for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth;
if (n != 0)
(*pGC->ops->PolyGlyphBlt)(
pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font));
return x+w;
}
_X_EXPORT int _X_EXPORT int
miPolyText8(pDraw, pGC, x, y, count, chars) miPolyText8(pDraw, pGC, x, y, count, chars)
DrawablePtr pDraw; DrawablePtr pDraw;
@ -112,7 +88,6 @@ miPolyText8(pDraw, pGC, x, y, count, chars)
return x+w; return x+w;
} }
_X_EXPORT int _X_EXPORT int
miPolyText16(pDraw, pGC, x, y, count, chars) miPolyText16(pDraw, pGC, x, y, count, chars)
DrawablePtr pDraw; DrawablePtr pDraw;
@ -136,31 +111,6 @@ miPolyText16(pDraw, pGC, x, y, count, chars)
return x+w; return x+w;
} }
int
miImageText(pDraw, pGC, x, y, count, chars, fontEncoding)
DrawablePtr pDraw;
GCPtr pGC;
int x, y;
int count;
char *chars;
FontEncoding fontEncoding;
{
unsigned long n, i;
FontPtr font = pGC->font;
int w;
CharInfoPtr charinfo[255];
GetGlyphs(font, (unsigned long)count, (unsigned char *)chars,
fontEncoding, &n, charinfo);
w = 0;
for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth;
if (n !=0 )
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font));
return x+w;
}
_X_EXPORT void _X_EXPORT void
miImageText8(pDraw, pGC, x, y, count, chars) miImageText8(pDraw, pGC, x, y, count, chars)
DrawablePtr pDraw; DrawablePtr pDraw;
@ -179,7 +129,6 @@ miImageText8(pDraw, pGC, x, y, count, chars)
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font));
} }
_X_EXPORT void _X_EXPORT void
miImageText16(pDraw, pGC, x, y, count, chars) miImageText16(pDraw, pGC, x, y, count, chars)
DrawablePtr pDraw; DrawablePtr pDraw;

View File

@ -73,13 +73,9 @@ SOFTWARE.
* bucket. Finally, we can insert it. * bucket. Finally, we can insert it.
* *
*/ */
Bool static Bool
miInsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock) miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
EdgeTable *ET; ScanLineListBlock **SLLBlock, int *iSLLBlock)
EdgeTableEntry *ETE;
int scanline;
ScanLineListBlock **SLLBlock;
int *iSLLBlock;
{ {
EdgeTableEntry *start, *prev; EdgeTableEntry *start, *prev;
ScanLineList *pSLL, *pPrevSLL; ScanLineList *pSLL, *pPrevSLL;

View File

@ -221,7 +221,7 @@ _X_EXPORT BoxRec miEmptyBox = {0, 0, 0, 0};
_X_EXPORT RegDataRec miEmptyData = {0, 0}; _X_EXPORT RegDataRec miEmptyData = {0, 0};
RegDataRec miBrokenData = {0, 0}; RegDataRec miBrokenData = {0, 0};
RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData }; static RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData };
_X_EXPORT void _X_EXPORT void
miPrintRegion(rgn) miPrintRegion(rgn)
@ -913,7 +913,7 @@ miRegionOp(
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
void static void
miSetExtents (pReg) miSetExtents (pReg)
RegionPtr pReg; RegionPtr pReg;
{ {
@ -2182,35 +2182,6 @@ miTranslateRegion(pReg, x, y)
} }
} }
Bool
miRegionDataCopy(
RegionPtr dst,
RegionPtr src)
{
good(dst);
good(src);
if (dst->data)
return TRUE;
if (dst == src)
return TRUE;
if (!src->data || !src->data->size)
{
xfreeData(dst);
dst->data = (RegDataPtr)NULL;
return TRUE;
}
if (!dst->data || (dst->data->size < src->data->numRects))
{
xfreeData(dst);
dst->data = xallocData(src->data->numRects);
if (!dst->data)
return miRegionBreak (dst);
}
dst->data->size = src->data->size;
dst->data->numRects = src->data->numRects;
return TRUE;
}
_X_EXPORT void _X_EXPORT void
miRegionReset(pReg, pBox) miRegionReset(pReg, pBox)
RegionPtr pReg; RegionPtr pReg;

View File

@ -126,12 +126,8 @@ miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind,
return TRUE; return TRUE;
} }
static Bool
/*ARGSUSED*/ miCloseScreen (int iScreen, ScreenPtr pScreen)
Bool
miCloseScreen (iScreen, pScreen)
int iScreen;
ScreenPtr pScreen;
{ {
return ((*pScreen->DestroyPixmap)((PixmapPtr)pScreen->devPrivate)); return ((*pScreen->DestroyPixmap)((PixmapPtr)pScreen->devPrivate));
} }

View File

@ -78,9 +78,7 @@ void miInitSpanGroup(spanGroup)
#define YMIN(spans) (spans->points[0].y) #define YMIN(spans) (spans->points[0].y)
#define YMAX(spans) (spans->points[spans->count-1].y) #define YMAX(spans) (spans->points[spans->count-1].y)
void miSubtractSpans (spanGroup, sub) static void miSubtractSpans (SpanGroup *spanGroup, Spans *sub)
SpanGroup *spanGroup;
Spans *sub;
{ {
int i, subCount, spansCount; int i, subCount, spansCount;
int ymin, ymax, xmin, xmax; int ymin, ymax, xmin, xmax;
@ -364,9 +362,8 @@ static int UniquifySpansX(
return (newWidths - startNewWidths) + 1; return (newWidths - startNewWidths) + 1;
} /* UniquifySpansX */ } /* UniquifySpansX */
void static void
miDisposeSpanGroup (spanGroup) miDisposeSpanGroup (SpanGroup *spanGroup)
SpanGroup *spanGroup;
{ {
int i; int i;
Spans *spans; Spans *spans;
@ -538,24 +535,3 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
spanGroup->ymin = MAXSHORT; spanGroup->ymin = MAXSHORT;
spanGroup->ymax = MINSHORT; spanGroup->ymax = MINSHORT;
} }
void miFillSpanGroup(pDraw, pGC, spanGroup)
DrawablePtr pDraw;
GCPtr pGC;
SpanGroup *spanGroup;
{
int i;
Spans *spans;
for (i = 0, spans = spanGroup->group; i != spanGroup->count; i++, spans++) {
(*pGC->ops->FillSpans)
(pDraw, pGC, spans->count, spans->points, spans->widths, TRUE);
xfree(spans->points);
xfree(spans->widths);
}
spanGroup->count = 0;
spanGroup->ymin = MAXSHORT;
spanGroup->ymax = MINSHORT;
} /* FillSpanGroup */

View File

@ -71,13 +71,6 @@ extern void miAppendSpans(
Spans * /*spans*/ Spans * /*spans*/
); );
/* Paint a span group, possibly with some overlap */
extern void miFillSpanGroup(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
SpanGroup * /*spanGroup*/
);
/* Paint a span group, insuring that each pixel is painted at most once */ /* Paint a span group, insuring that each pixel is painted at most once */
extern void miFillUniqueSpanGroup( extern void miFillUniqueSpanGroup(
DrawablePtr /*pDraw*/, DrawablePtr /*pDraw*/,
@ -90,15 +83,6 @@ extern void miFreeSpanGroup(
SpanGroup * /*spanGroup*/ SpanGroup * /*spanGroup*/
); );
extern void miSubtractSpans(
SpanGroup * /*spanGroup*/,
Spans * /*sub*/
);
extern void miDisposeSpanGroup(
SpanGroup * /*spanGroup*/
);
extern int miClipSpans( extern int miClipSpans(
RegionPtr /*prgnDst*/, RegionPtr /*prgnDst*/,
DDXPointPtr /*ppt*/, DDXPointPtr /*ppt*/,

View File

@ -67,17 +67,11 @@ static void miLineArc(DrawablePtr pDraw, GCPtr pGC,
* spans-based polygon filler * spans-based polygon filler
*/ */
void static void
miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height, miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
left, right, left_count, right_count) SpanDataPtr spanData, int y, int overall_height,
DrawablePtr pDrawable; PolyEdgePtr left, PolyEdgePtr right,
GCPtr pGC; int left_count, int right_count)
unsigned long pixel;
SpanDataPtr spanData;
int y; /* start y coordinate */
int overall_height; /* height of entire segment */
PolyEdgePtr left, right;
int left_count, right_count;
{ {
int left_x = 0, left_e = 0; int left_x = 0, left_e = 0;
int left_stepx = 0; int left_stepx = 0;
@ -873,11 +867,8 @@ miLineArcD (
return (pts - points); return (pts - points);
} }
int static int
miRoundJoinFace (face, edge, leftEdge) miRoundJoinFace (LineFacePtr face, PolyEdgePtr edge, Bool *leftEdge)
LineFacePtr face;
PolyEdgePtr edge;
Bool *leftEdge;
{ {
int y; int y;
int dx, dy; int dx, dy;
@ -1114,16 +1105,10 @@ miLineArc (
} }
} }
void static void
miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg, isInt) miLineProjectingCap (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
DrawablePtr pDrawable; SpanDataPtr spanData, LineFacePtr face, Bool isLeft,
GCPtr pGC; double xorg, double yorg, Bool isInt)
unsigned long pixel;
SpanDataPtr spanData;
LineFacePtr face;
Bool isLeft;
double xorg, yorg;
Bool isInt;
{ {
int xorgi = 0, yorgi = 0; int xorgi = 0, yorgi = 0;
int lw; int lw;
@ -1506,11 +1491,8 @@ miWideSegment (
} }
} }
SpanDataPtr static SpanDataPtr
miSetupSpanData (pGC, spanData, npt) miSetupSpanData (GCPtr pGC, SpanDataPtr spanData, int npt)
GCPtr pGC;
SpanDataPtr spanData;
int npt;
{ {
if ((npt < 3 && pGC->capStyle != CapRound) || miSpansEasyRop(pGC->alu)) if ((npt < 3 && pGC->capStyle != CapRound) || miSpansEasyRop(pGC->alu))
return (SpanDataPtr) NULL; return (SpanDataPtr) NULL;
@ -1520,11 +1502,8 @@ miSetupSpanData (pGC, spanData, npt)
return spanData; return spanData;
} }
void static void
miCleanupSpanData (pDrawable, pGC, spanData) miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData)
DrawablePtr pDrawable;
GCPtr pGC;
SpanDataPtr spanData;
{ {
if (pGC->lineStyle == LineDoubleDash) if (pGC->lineStyle == LineDoubleDash)
{ {

View File

@ -153,24 +153,6 @@ typedef struct _LineFace {
} \ } \
} }
extern void miFillPolyHelper(
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
unsigned long /*pixel*/,
SpanDataPtr /*spanData*/,
int /*y*/,
int /*overall_height*/,
PolyEdgePtr /*left*/,
PolyEdgePtr /*right*/,
int /*left_count*/,
int /*right_count*/
);
extern int miRoundJoinFace(
LineFacePtr /*face*/,
PolyEdgePtr /*edge*/,
Bool * /*leftEdge*/
);
extern void miRoundJoinClip( extern void miRoundJoinClip(
LineFacePtr /*pLeft*/, LineFacePtr /*pLeft*/,
LineFacePtr /*pRight*/, LineFacePtr /*pRight*/,
@ -189,30 +171,6 @@ extern int miRoundCapClip(
Bool * /*leftEdge*/ Bool * /*leftEdge*/
); );
extern void miLineProjectingCap(
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
unsigned long /*pixel*/,
SpanDataPtr /*spanData*/,
LineFacePtr /*face*/,
Bool /*isLeft*/,
double /*xorg*/,
double /*yorg*/,
Bool /*isInt*/
);
extern SpanDataPtr miSetupSpanData(
GCPtr /*pGC*/,
SpanDataPtr /*spanData*/,
int /*npt*/
);
extern void miCleanupSpanData(
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
SpanDataPtr /*spanData*/
);
extern int miPolyBuildEdge(double x0, double y0, double k, int dx, int dy, extern int miPolyBuildEdge(double x0, double y0, double k, int dx, int dy,
int xi, int yi, int left, PolyEdgePtr edge); int xi, int yi, int left, PolyEdgePtr edge);
extern int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes, extern int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes,

View File

@ -401,10 +401,8 @@ miZeroArcSetup(arc, info, ok360)
#define DoPix(idx,xval,yval) if (mask & (1 << idx)) Pixelate(xval, yval); #define DoPix(idx,xval,yval) if (mask & (1 << idx)) Pixelate(xval, yval);
DDXPointPtr static DDXPointPtr
miZeroArcPts(arc, pts) miZeroArcPts(xArc *arc, DDXPointPtr pts)
xArc *arc;
DDXPointPtr pts;
{ {
miZeroArcRec info; miZeroArcRec info;
int x, y, a, b, d, mask; int x, y, a, b, d, mask;

View File

@ -124,9 +124,3 @@ extern Bool miZeroArcSetup(
miZeroArcRec * /*info*/, miZeroArcRec * /*info*/,
Bool /*ok360*/ Bool /*ok360*/
); );
extern DDXPointPtr miZeroArcPts(
xArc * /*arc*/,
DDXPointPtr /*pts*/
);