aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render/picture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
committermarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
commit4f005bade376d15ee60e90ca45a831aff9725087 (patch)
tree5abdbe5a7c55acf9e30c533414796f629fa9e47c /xorg-server/render/picture.c
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.gz
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.bz2
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.zip
libX11 libXft mesa mkfontscale pixman xserver git update 26 okt 2011
Diffstat (limited to 'xorg-server/render/picture.c')
-rw-r--r--xorg-server/render/picture.c44
1 files changed, 12 insertions, 32 deletions
diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c
index 5640c4d96..f13459665 100644
--- a/xorg-server/render/picture.c
+++ b/xorg-server/render/picture.c
@@ -1715,23 +1715,14 @@ CompositeTriStrip (CARD8 op,
int npoints,
xPointFixed *points)
{
- xTriangle *tris, *tri;
- int ntri;
-
+ PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen);
+
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);
+
+ ValidatePicture (pSrc);
+ ValidatePicture (pDst);
+ (*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points);
}
void
@@ -1744,25 +1735,14 @@ CompositeTriFan (CARD8 op,
int npoints,
xPointFixed *points)
{
- xTriangle *tris, *tri;
- xPointFixed *first;
- int ntri;
-
+ PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen);
+
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);
+
+ ValidatePicture (pSrc);
+ ValidatePicture (pDst);
+ (*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points);
}
void