Remove TriStrip and TriFan from the picture screen
These functions no longer go through the screen vtable, so remove them and fix up the various wrappers. 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
0eb5b0fbcf
commit
d7f8011418
|
@ -249,8 +249,6 @@ typedef struct _DMXScreenInfo {
|
||||||
|
|
||||||
TrapezoidsProcPtr Trapezoids;
|
TrapezoidsProcPtr Trapezoids;
|
||||||
TrianglesProcPtr Triangles;
|
TrianglesProcPtr Triangles;
|
||||||
TriStripProcPtr TriStrip;
|
|
||||||
TriFanProcPtr TriFan;
|
|
||||||
} DMXScreenInfo;
|
} DMXScreenInfo;
|
||||||
|
|
||||||
/* Global variables available to all Xserver/hw/dmx routines. */
|
/* Global variables available to all Xserver/hw/dmx routines. */
|
||||||
|
|
|
@ -165,8 +165,6 @@ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
|
||||||
|
|
||||||
DMX_WRAP(Trapezoids, dmxTrapezoids, dmxScreen, ps);
|
DMX_WRAP(Trapezoids, dmxTrapezoids, dmxScreen, ps);
|
||||||
DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
|
DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
|
||||||
DMX_WRAP(TriStrip, dmxTriStrip, dmxScreen, ps);
|
|
||||||
DMX_WRAP(TriFan, dmxTriFan, dmxScreen, ps);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1237,88 +1235,3 @@ void dmxTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
|
|
||||||
DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
|
DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Composite a triangle strip on the appropriate screen. For a
|
|
||||||
* complete description see the protocol document of the RENDER
|
|
||||||
* library. */
|
|
||||||
void dmxTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc, INT16 ySrc,
|
|
||||||
int npoint, xPointFixed *points)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
|
||||||
dmxPictPrivPtr pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
|
|
||||||
dmxPictPrivPtr pDstPriv = DMX_GET_PICT_PRIV(pDst);
|
|
||||||
|
|
||||||
DMX_UNWRAP(TriStrip, dmxScreen, ps);
|
|
||||||
#if 0
|
|
||||||
if (ps->TriStrip)
|
|
||||||
ps->TriStrip(op, pSrc, pDst, maskFormat, xSrc, ySrc, npoint, *points);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Draw trapezoids on back-end server */
|
|
||||||
if (pDstPriv->pict) {
|
|
||||||
XRenderPictFormat *pFormat;
|
|
||||||
|
|
||||||
pFormat = dmxFindFormat(dmxScreen, maskFormat);
|
|
||||||
if (!pFormat) {
|
|
||||||
/* FIXME: Error! */
|
|
||||||
}
|
|
||||||
|
|
||||||
XRenderCompositeTriStrip(dmxScreen->beDisplay,
|
|
||||||
op,
|
|
||||||
pSrcPriv->pict,
|
|
||||||
pDstPriv->pict,
|
|
||||||
pFormat,
|
|
||||||
xSrc, ySrc,
|
|
||||||
(XPointFixed *)points,
|
|
||||||
npoint);
|
|
||||||
dmxSync(dmxScreen, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
DMX_WRAP(TriStrip, dmxTriStrip, dmxScreen, ps);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Composite a triangle fan on the appropriate screen. For a complete
|
|
||||||
* description see the protocol document of the RENDER library. */
|
|
||||||
void dmxTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc, INT16 ySrc,
|
|
||||||
int npoint, xPointFixed *points)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
|
||||||
dmxPictPrivPtr pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
|
|
||||||
dmxPictPrivPtr pDstPriv = DMX_GET_PICT_PRIV(pDst);
|
|
||||||
|
|
||||||
DMX_UNWRAP(TriFan, dmxScreen, ps);
|
|
||||||
#if 0
|
|
||||||
if (ps->TriFan)
|
|
||||||
ps->TriFan(op, pSrc, pDst, maskFormat, xSrc, ySrc, npoint, *points);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Draw trapezoids on back-end server */
|
|
||||||
if (pDstPriv->pict) {
|
|
||||||
XRenderPictFormat *pFormat;
|
|
||||||
|
|
||||||
pFormat = dmxFindFormat(dmxScreen, maskFormat);
|
|
||||||
if (!pFormat) {
|
|
||||||
/* FIXME: Error! */
|
|
||||||
}
|
|
||||||
|
|
||||||
XRenderCompositeTriFan(dmxScreen->beDisplay,
|
|
||||||
op,
|
|
||||||
pSrcPriv->pict,
|
|
||||||
pDstPriv->pict,
|
|
||||||
pFormat,
|
|
||||||
xSrc, ySrc,
|
|
||||||
(XPointFixed *)points,
|
|
||||||
npoint);
|
|
||||||
dmxSync(dmxScreen, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
DMX_WRAP(TriFan, dmxTriFan, dmxScreen, ps);
|
|
||||||
}
|
|
||||||
|
|
|
@ -100,16 +100,6 @@ extern void dmxTriangles(CARD8 op,
|
||||||
PictFormatPtr maskFormat,
|
PictFormatPtr maskFormat,
|
||||||
INT16 xSrc, INT16 ySrc,
|
INT16 xSrc, INT16 ySrc,
|
||||||
int ntri, xTriangle *tris);
|
int ntri, xTriangle *tris);
|
||||||
extern void dmxTriStrip(CARD8 op,
|
|
||||||
PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc, INT16 ySrc,
|
|
||||||
int npoint, xPointFixed *points);
|
|
||||||
extern void dmxTriFan(CARD8 op,
|
|
||||||
PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc, INT16 ySrc,
|
|
||||||
int npoint, xPointFixed *points);
|
|
||||||
|
|
||||||
extern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet);
|
extern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet);
|
||||||
extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
|
extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
|
||||||
|
|
|
@ -106,8 +106,6 @@ typedef struct {
|
||||||
|
|
||||||
TrapezoidsProcPtr Trapezoids;
|
TrapezoidsProcPtr Trapezoids;
|
||||||
TrianglesProcPtr Triangles;
|
TrianglesProcPtr Triangles;
|
||||||
TriStripProcPtr TriStrip;
|
|
||||||
TriFanProcPtr TriFan;
|
|
||||||
|
|
||||||
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
||||||
} cwScreenRec, *cwScreenPtr;
|
} cwScreenRec, *cwScreenPtr;
|
||||||
|
|
|
@ -371,66 +371,6 @@ cwTriangles (CARD8 op,
|
||||||
cwPsWrap(Triangles, cwTriangles);
|
cwPsWrap(Triangles, cwTriangles);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
cwTriStrip (CARD8 op,
|
|
||||||
PicturePtr pSrcPicture,
|
|
||||||
PicturePtr pDstPicture,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDstPicture->pDrawable->pScreen;
|
|
||||||
cwPsDecl(pScreen);
|
|
||||||
cwSrcPictureDecl;
|
|
||||||
cwDstPictureDecl;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
cwPsUnwrap(TriStrip);
|
|
||||||
if (dst_picture_x_off || dst_picture_y_off) {
|
|
||||||
for (i = 0; i < npoint; i++)
|
|
||||||
{
|
|
||||||
points[i].x += dst_picture_x_off << 16;
|
|
||||||
points[i].y += dst_picture_y_off << 16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(*ps->TriStrip) (op, pBackingSrcPicture, pBackingDstPicture, maskFormat,
|
|
||||||
xSrc + src_picture_x_off, ySrc + src_picture_y_off,
|
|
||||||
npoint, points);
|
|
||||||
cwPsWrap(TriStrip, cwTriStrip);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
cwTriFan (CARD8 op,
|
|
||||||
PicturePtr pSrcPicture,
|
|
||||||
PicturePtr pDstPicture,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDstPicture->pDrawable->pScreen;
|
|
||||||
cwPsDecl(pScreen);
|
|
||||||
cwSrcPictureDecl;
|
|
||||||
cwDstPictureDecl;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
cwPsUnwrap(TriFan);
|
|
||||||
if (dst_picture_x_off || dst_picture_y_off) {
|
|
||||||
for (i = 0; i < npoint; i++)
|
|
||||||
{
|
|
||||||
points[i].x += dst_picture_x_off << 16;
|
|
||||||
points[i].y += dst_picture_y_off << 16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(*ps->TriFan) (op, pBackingSrcPicture, pBackingDstPicture, maskFormat,
|
|
||||||
xSrc + src_picture_x_off, ySrc + src_picture_y_off,
|
|
||||||
npoint, points);
|
|
||||||
cwPsWrap(TriFan, cwTriFan);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cwInitializeRender (ScreenPtr pScreen)
|
cwInitializeRender (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -443,8 +383,6 @@ cwInitializeRender (ScreenPtr pScreen)
|
||||||
cwPsWrap(CompositeRects, cwCompositeRects);
|
cwPsWrap(CompositeRects, cwCompositeRects);
|
||||||
cwPsWrap(Trapezoids, cwTrapezoids);
|
cwPsWrap(Trapezoids, cwTrapezoids);
|
||||||
cwPsWrap(Triangles, cwTriangles);
|
cwPsWrap(Triangles, cwTriangles);
|
||||||
cwPsWrap(TriStrip, cwTriStrip);
|
|
||||||
cwPsWrap(TriFan, cwTriFan);
|
|
||||||
/* There is no need to wrap AddTraps as far as we can tell. AddTraps can
|
/* There is no need to wrap AddTraps as far as we can tell. AddTraps can
|
||||||
* only be done on alpha-only pictures, and we won't be getting
|
* only be done on alpha-only pictures, and we won't be getting
|
||||||
* alpha-only window pictures, so there's no need to translate.
|
* alpha-only window pictures, so there's no need to translate.
|
||||||
|
@ -463,7 +401,5 @@ cwFiniRender (ScreenPtr pScreen)
|
||||||
cwPsUnwrap(CompositeRects);
|
cwPsUnwrap(CompositeRects);
|
||||||
cwPsUnwrap(Trapezoids);
|
cwPsUnwrap(Trapezoids);
|
||||||
cwPsUnwrap(Triangles);
|
cwPsUnwrap(Triangles);
|
||||||
cwPsUnwrap(TriStrip);
|
|
||||||
cwPsUnwrap(TriFan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -601,8 +601,6 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
|
||||||
ps->CompositeRects = miCompositeRects;
|
ps->CompositeRects = miCompositeRects;
|
||||||
ps->Trapezoids = 0;
|
ps->Trapezoids = 0;
|
||||||
ps->Triangles = 0;
|
ps->Triangles = 0;
|
||||||
ps->TriStrip = miTriStrip;
|
|
||||||
ps->TriFan = miTriFan;
|
|
||||||
|
|
||||||
ps->RasterizeTrapezoid = 0; /* requires DDX support */
|
ps->RasterizeTrapezoid = 0; /* requires DDX support */
|
||||||
ps->AddTraps = 0; /* requires DDX support */
|
ps->AddTraps = 0; /* requires DDX support */
|
||||||
|
|
|
@ -148,26 +148,6 @@ miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
|
miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
miTriStrip (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points);
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
miTriFan (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
miInitIndexed (ScreenPtr pScreen,
|
miInitIndexed (ScreenPtr pScreen,
|
||||||
PictFormatPtr pFormat);
|
PictFormatPtr pFormat);
|
||||||
|
|
|
@ -66,27 +66,3 @@ miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds)
|
||||||
{
|
{
|
||||||
miPointFixedBounds (ntri * 3, (xPointFixed *) tris, bounds);
|
miPointFixedBounds (ntri * 3, (xPointFixed *) tris, bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
miTriStrip (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
miTriFan (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
int npoint,
|
|
||||||
xPointFixed *points)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
|
@ -381,8 +381,6 @@ typedef struct _PictureScreen {
|
||||||
|
|
||||||
TrapezoidsProcPtr Trapezoids;
|
TrapezoidsProcPtr Trapezoids;
|
||||||
TrianglesProcPtr Triangles;
|
TrianglesProcPtr Triangles;
|
||||||
TriStripProcPtr TriStrip;
|
|
||||||
TriFanProcPtr TriFan;
|
|
||||||
|
|
||||||
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user