Absorb miTriFan() into CompositeTriFan()
There is no need to virtualize this function that nobody cares about. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com>
This commit is contained in:
parent
f985a7319e
commit
c2af0cea02
|
@ -108,25 +108,4 @@ miTriFan (CARD8 op,
|
||||||
int npoint,
|
int npoint,
|
||||||
xPointFixed *points)
|
xPointFixed *points)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
|
||||||
xTriangle *tris, *tri;
|
|
||||||
xPointFixed *first;
|
|
||||||
int ntri;
|
|
||||||
|
|
||||||
if (npoint < 3)
|
|
||||||
return;
|
|
||||||
ntri = npoint - 2;
|
|
||||||
tris = malloc(ntri * sizeof (xTriangle));
|
|
||||||
if (!tris)
|
|
||||||
return;
|
|
||||||
first = points++;
|
|
||||||
for (tri = tris; npoint >= 3; npoint--, points++, tri++)
|
|
||||||
{
|
|
||||||
tri->p1 = *first;
|
|
||||||
tri->p2 = points[0];
|
|
||||||
tri->p3 = points[1];
|
|
||||||
}
|
|
||||||
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
|
|
||||||
free(tris);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1790,11 +1790,26 @@ CompositeTriFan (CARD8 op,
|
||||||
int npoints,
|
int npoints,
|
||||||
xPointFixed *points)
|
xPointFixed *points)
|
||||||
{
|
{
|
||||||
PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen);
|
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
||||||
|
xTriangle *tris, *tri;
|
||||||
|
xPointFixed *first;
|
||||||
|
int ntri;
|
||||||
|
|
||||||
ValidatePicture (pSrc);
|
if (npoints < 3)
|
||||||
ValidatePicture (pDst);
|
return;
|
||||||
(*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points);
|
ntri = npoints - 2;
|
||||||
|
tris = malloc(ntri * sizeof (xTriangle));
|
||||||
|
if (!tris)
|
||||||
|
return;
|
||||||
|
first = points++;
|
||||||
|
for (tri = tris; npoints >= 3; npoints--, points++, tri++)
|
||||||
|
{
|
||||||
|
tri->p1 = *first;
|
||||||
|
tri->p2 = points[0];
|
||||||
|
tri->p3 = points[1];
|
||||||
|
}
|
||||||
|
CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
|
||||||
|
free(tris);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue