[PATCH 2/3] Absorb miTriStrip() into CompositeTriStrip()
From: Søren Sandmann Pedersen There is no need to virtualize this function that nobody cares about. Signed-off-by: Soren Sandmann --- render/mitri.c | 19 --- render/picture.c | 22 ++ 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/render/mitri.c b/render/mitri.c index c74192c..2ca7cc4 100644 --- a/render/mitri.c +++ b/render/mitri.c @@ -77,25 +77,6 @@ miTriStrip (CARD8op, int npoint, xPointFixed *points) { -ScreenPtr pScreen = pDst->pDrawable->pScreen; -PictureScreenPtrps = GetPictureScreen(pScreen); -xTriangle *tris, *tri; -intntri; - -if (npoint < 3) - return; -ntri = npoint - 2; -tris = malloc(ntri * sizeof (xTriangle)); -if (!tris) - return; -for (tri = tris; npoint >= 3; npoint--, points++, tri++) -{ - tri->p1 = points[0]; - tri->p2 = points[1]; - tri->p3 = points[2]; -} -(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); -free(tris); } void diff --git a/render/picture.c b/render/picture.c index e16163a..015d633 100644 --- a/render/picture.c +++ b/render/picture.c @@ -1773,11 +1773,25 @@ CompositeTriStrip (CARD8op, int npoints, xPointFixed *points) { -PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); +ScreenPtr pScreen = pDst->pDrawable->pScreen; +PictureScreenPtrps = GetPictureScreen(pScreen); +xTriangle *tris, *tri; +int ntri; -ValidatePicture (pSrc); -ValidatePicture (pDst); -(*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); +if (npoints < 3) +return; +ntri = npoints - 2; +tris = malloc(ntri * sizeof (xTriangle)); +if (!tris) +return; +for (tri = tris; npoints >= 3; npoints--, points++, tri++) +{ +tri->p1 = points[0]; +tri->p2 = points[1]; +tri->p3 = points[2]; +} +CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); +free(tris); } void -- 1.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 2/3] Absorb miTriStrip() into CompositeTriStrip()
From: Søren Sandmann Pedersen There is no need to virtualize this function that nobody cares about. --- render/mitri.c | 19 --- render/picture.c | 22 ++ 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/render/mitri.c b/render/mitri.c index c74192c..2ca7cc4 100644 --- a/render/mitri.c +++ b/render/mitri.c @@ -77,25 +77,6 @@ miTriStrip (CARD8op, int npoint, xPointFixed *points) { -ScreenPtr pScreen = pDst->pDrawable->pScreen; -PictureScreenPtrps = GetPictureScreen(pScreen); -xTriangle *tris, *tri; -intntri; - -if (npoint < 3) - return; -ntri = npoint - 2; -tris = malloc(ntri * sizeof (xTriangle)); -if (!tris) - return; -for (tri = tris; npoint >= 3; npoint--, points++, tri++) -{ - tri->p1 = points[0]; - tri->p2 = points[1]; - tri->p3 = points[2]; -} -(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); -free(tris); } void diff --git a/render/picture.c b/render/picture.c index e16163a..015d633 100644 --- a/render/picture.c +++ b/render/picture.c @@ -1773,11 +1773,25 @@ CompositeTriStrip (CARD8op, int npoints, xPointFixed *points) { -PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); +ScreenPtr pScreen = pDst->pDrawable->pScreen; +PictureScreenPtrps = GetPictureScreen(pScreen); +xTriangle *tris, *tri; +int ntri; -ValidatePicture (pSrc); -ValidatePicture (pDst); -(*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); +if (npoints < 3) +return; +ntri = npoints - 2; +tris = malloc(ntri * sizeof (xTriangle)); +if (!tris) +return; +for (tri = tris; npoints >= 3; npoints--, points++, tri++) +{ +tri->p1 = points[0]; +tri->p2 = points[1]; +tri->p3 = points[2]; +} +CompositeTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); +free(tris); } void -- 1.6.0.6 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel