1 diff -ru a/fb/fbpict.c b/fb/fbpict.c
2 --- a/fb/fbpict.c 2011-08-01 01:44:24.000000000 +0200
3 +++ b/fb/fbpict.c 2011-10-05 22:45:29.000000000 +0200
6 ps->CompositeRects = miCompositeRects;
7 ps->RasterizeTrapezoid = fbRasterizeTrapezoid;
8 - ps->Trapezoids = fbTrapezoids;
9 + ps->Trapezoids = miTrapezoids;
10 ps->AddTraps = fbAddTraps;
11 ps->AddTriangles = fbAddTriangles;
12 ps->Triangles = fbTriangles;
13 diff -ru a/render/mipict.c b/render/mipict.c
14 --- a/render/mipict.c 2011-04-04 05:19:50.000000000 +0200
15 +++ b/render/mipict.c 2011-10-05 22:02:53.000000000 +0200
21 +miTrapezoids (CARD8 op,
24 + PictFormatPtr maskFormat,
30 + ScreenPtr pScreen = pDst->pDrawable->pScreen;
31 + PictureScreenPtr ps = GetPictureScreen(pScreen);
34 + * Check for solid alpha add
36 + if (op == PictOpAdd && miIsSolidAlpha (pSrc))
38 + for (; ntrap; ntrap--, traps++)
39 + (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
41 + else if (maskFormat)
43 + PicturePtr pPicture;
48 + xDst = traps[0].left.p1.x >> 16;
49 + yDst = traps[0].left.p1.y >> 16;
51 + miTrapezoidBounds (ntrap, traps, &bounds);
52 + if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
54 + pPicture = miCreateAlphaPicture (pScreen, pDst, maskFormat,
55 + bounds.x2 - bounds.x1,
56 + bounds.y2 - bounds.y1);
59 + for (; ntrap; ntrap--, traps++)
60 + (*ps->RasterizeTrapezoid) (pPicture, traps,
61 + -bounds.x1, -bounds.y1);
62 + xRel = bounds.x1 + xSrc - xDst;
63 + yRel = bounds.y1 + ySrc - yDst;
64 + CompositePicture (op, pSrc, pPicture, pDst,
65 + xRel, yRel, 0, 0, bounds.x1, bounds.y1,
66 + bounds.x2 - bounds.x1,
67 + bounds.y2 - bounds.y1);
68 + FreePicture (pPicture, 0);
72 + if (pDst->polyEdge == PolyEdgeSharp)
73 + maskFormat = PictureMatchFormat (pScreen, 1, PICT_a1);
75 + maskFormat = PictureMatchFormat (pScreen, 8, PICT_a8);
76 + for (; ntrap; ntrap--, traps++)
77 + miTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps);
82 miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
85 ps->Composite = 0; /* requires DDX support */
86 ps->Glyphs = miGlyphs;
87 ps->CompositeRects = miCompositeRects;
89 + ps->Trapezoids = miTrapezoids;
92 ps->RasterizeTrapezoid = 0; /* requires DDX support */
93 diff -ru a/render/mipict.h b/render/mipict.h
94 --- a/render/mipict.h 2011-04-04 05:19:50.000000000 +0200
95 +++ b/render/mipict.h 2011-10-05 22:06:19.000000000 +0200
100 +extern _X_EXPORT PicturePtr
101 +miCreateAlphaPicture (ScreenPtr pScreen,
103 + PictFormatPtr pPictFormat,
107 +extern _X_EXPORT void
108 +miTrapezoids (CARD8 op,
111 + PictFormatPtr maskFormat,
115 + xTrapezoid *traps);
117 extern _X_EXPORT Bool
118 miIsSolidAlpha (PicturePtr pSrc);
120 diff -ru a/render/mitrap.c b/render/mitrap.c
121 --- a/render/mitrap.c 2011-04-04 05:19:50.000000000 +0200
122 +++ b/render/mitrap.c 2011-10-05 22:05:29.000000000 +0200
124 #include "picturestr.h"
128 +miCreateAlphaPicture (ScreenPtr pScreen,
130 + PictFormatPtr pPictFormat,
135 + PicturePtr pPicture;
140 + if (width > 32767 || height > 32767)
145 + if (pDst->polyEdge == PolyEdgeSharp)
146 + pPictFormat = PictureMatchFormat (pScreen, 1, PICT_a1);
148 + pPictFormat = PictureMatchFormat (pScreen, 8, PICT_a8);
153 + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
154 + pPictFormat->depth, 0);
157 + pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
160 + (*pScreen->DestroyPixmap) (pPixmap);
163 + ValidateGC (&pPixmap->drawable, pGC);
166 + rect.width = width;
167 + rect.height = height;
168 + (*pGC->ops->PolyFillRect)(&pPixmap->drawable, pGC, 1, &rect);
169 + FreeScratchGC (pGC);
170 + pPicture = CreatePicture (0, &pPixmap->drawable, pPictFormat,
171 + 0, 0, serverClient, &error);
172 + (*pScreen->DestroyPixmap) (pPixmap);
177 miLineFixedX (xLineFixed *l, xFixed y, Bool ceil)