diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-02-26 05:39:39 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-02-26 06:00:00 -0500 |
commit | d15b4888c72f9979e32a017a3ab6ac47efa53a1c (patch) | |
tree | c686aafa8b1c700b413477e502a7df9418b7a1bd | |
parent | 7dc3ea6dc321649709e1ab3df0fa2b3b76f40054 (diff) |
Absorb miTriFan() into CompositeTriFan().
We really don't need to virtualize this function that nobody cares about.
-rw-r--r-- | render/mitri.c | 21 | ||||
-rw-r--r-- | render/picture.c | 23 |
2 files changed, 19 insertions, 25 deletions
diff --git a/render/mitri.c b/render/mitri.c index b258c2156..c74192c1a 100644 --- a/render/mitri.c +++ b/render/mitri.c @@ -108,25 +108,4 @@ miTriFan (CARD8 op, int npoint, 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); } diff --git a/render/picture.c b/render/picture.c index 0028cc76a..e16163ac7 100644 --- a/render/picture.c +++ b/render/picture.c @@ -1790,11 +1790,26 @@ CompositeTriFan (CARD8 op, int npoints, xPointFixed *points) { - PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); + ScreenPtr pScreen = pDst->pDrawable->pScreen; + xTriangle *tris, *tri; + xPointFixed *first; + int ntri; - ValidatePicture (pSrc); - ValidatePicture (pDst); - (*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); + if (npoints < 3) + return; + 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 |