[PATCH 3/3] Remove TriStrip and TriFan from the picture screen

Søren Sandmann sandmann at cs.au.dk
Sat Feb 26 12:04:04 PST 2011


From: Søren Sandmann Pedersen <ssp at redhat.com>

These functions no longer go through the screen vtable, so remove
them and fix up the various wrappers.
---
 hw/dmx/dmx.h         |    2 -
 hw/dmx/dmxpict.c     |   87 --------------------------------------------------
 hw/dmx/dmxpict.h     |   10 ------
 miext/cw/cw.h        |    2 -
 miext/cw/cw_render.c |   64 ------------------------------------
 render/mipict.c      |    2 -
 render/mipict.h      |   20 -----------
 render/mitri.c       |   24 --------------
 render/picturestr.h  |    2 -
 9 files changed, 0 insertions(+), 213 deletions(-)

diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
index bf4b92c..c6b6199 100644
--- a/hw/dmx/dmx.h
+++ b/hw/dmx/dmx.h
@@ -249,8 +249,6 @@ typedef struct _DMXScreenInfo {
 
     TrapezoidsProcPtr              Trapezoids;
     TrianglesProcPtr               Triangles;
-    TriStripProcPtr                TriStrip;
-    TriFanProcPtr                  TriFan;
 } DMXScreenInfo;
 
 /* Global variables available to all Xserver/hw/dmx routines. */
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index bbde8fd..1fb5462 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -165,8 +165,6 @@ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 
     DMX_WRAP(Trapezoids,         dmxTrapezoids,         dmxScreen, ps);
     DMX_WRAP(Triangles,          dmxTriangles,          dmxScreen, ps);
-    DMX_WRAP(TriStrip,           dmxTriStrip,           dmxScreen, ps);
-    DMX_WRAP(TriFan,             dmxTriFan,             dmxScreen, ps);
 
     return TRUE;
 }
@@ -1237,88 +1235,3 @@ void dmxTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 
     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);
-}
diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h
index 3c8a09c..a732991 100644
--- a/hw/dmx/dmxpict.h
+++ b/hw/dmx/dmxpict.h
@@ -100,16 +100,6 @@ extern void dmxTriangles(CARD8 op,
 			 PictFormatPtr maskFormat,
 			 INT16 xSrc, INT16 ySrc,
 			 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 Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
diff --git a/miext/cw/cw.h b/miext/cw/cw.h
index 31eb9e5..e2bb9ad 100644
--- a/miext/cw/cw.h
+++ b/miext/cw/cw.h
@@ -106,8 +106,6 @@ typedef struct {
 
     TrapezoidsProcPtr		Trapezoids;
     TrianglesProcPtr		Triangles;
-    TriStripProcPtr		TriStrip;
-    TriFanProcPtr		TriFan;
 
     RasterizeTrapezoidProcPtr	RasterizeTrapezoid;
 } cwScreenRec, *cwScreenPtr;
diff --git a/miext/cw/cw_render.c b/miext/cw/cw_render.c
index 165c44f..1f990ae 100644
--- a/miext/cw/cw_render.c
+++ b/miext/cw/cw_render.c
@@ -371,66 +371,6 @@ cwTriangles (CARD8	    op,
     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
 cwInitializeRender (ScreenPtr pScreen)
 {
@@ -443,8 +383,6 @@ cwInitializeRender (ScreenPtr pScreen)
     cwPsWrap(CompositeRects, cwCompositeRects);
     cwPsWrap(Trapezoids, cwTrapezoids);
     cwPsWrap(Triangles, cwTriangles);
-    cwPsWrap(TriStrip, cwTriStrip);
-    cwPsWrap(TriFan, cwTriFan);
     /* 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
      * alpha-only window pictures, so there's no need to translate.
@@ -463,7 +401,5 @@ cwFiniRender (ScreenPtr pScreen)
     cwPsUnwrap(CompositeRects);
     cwPsUnwrap(Trapezoids);
     cwPsUnwrap(Triangles);
-    cwPsUnwrap(TriStrip);
-    cwPsUnwrap(TriFan);
 }
 
diff --git a/render/mipict.c b/render/mipict.c
index 3b73888..e7144b5 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -633,8 +633,6 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
     ps->CompositeRects	= miCompositeRects;
     ps->Trapezoids	= 0;
     ps->Triangles	= 0;
-    ps->TriStrip	= miTriStrip;
-    ps->TriFan		= miTriFan;
     
     ps->RasterizeTrapezoid = 0;			/* requires DDX support */
     ps->AddTraps	= 0;			/* requires DDX support */
diff --git a/render/mipict.h b/render/mipict.h
index d149589..a49186c 100644
--- a/render/mipict.h
+++ b/render/mipict.h
@@ -151,26 +151,6 @@ miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
 extern _X_EXPORT void
 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
 miInitIndexed (ScreenPtr	pScreen,
 	       PictFormatPtr	pFormat);
diff --git a/render/mitri.c b/render/mitri.c
index 2ca7cc4..b322a7c 100644
--- a/render/mitri.c
+++ b/render/mitri.c
@@ -66,27 +66,3 @@ miTriangleBounds (int ntri, xTriangle *tris, BoxPtr 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)
-{
-}
diff --git a/render/picturestr.h b/render/picturestr.h
index ae69eef..7c7edb1 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -381,8 +381,6 @@ typedef struct _PictureScreen {
 
     TrapezoidsProcPtr		Trapezoids;
     TrianglesProcPtr		Triangles;
-    TriStripProcPtr		TriStrip;
-    TriFanProcPtr		TriFan;
 
     RasterizeTrapezoidProcPtr	RasterizeTrapezoid;
 
-- 
1.6.0.6



More information about the xorg-devel mailing list