[cairo-commit] libpixman/src ictri.c,1.8,1.9

Dave Beckett commit at pdx.freedesktop.org
Wed Dec 10 14:21:44 PST 2003


Committed by: dajobe

Update of /cvs/cairo/libpixman/src
In directory pdx:/tmp/cvs-serv9358

Modified Files:
	ictri.c 
Log Message:
Rename exported Ic* and PixRegion* functions, types, enums
to be prefixed pixman (or PIXMAN for enum values)


Index: ictri.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictri.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ictri.c	29 Oct 2003 18:45:02 -0000	1.8
--- ictri.c	10 Dec 2003 22:21:42 -0000	1.9
***************
*** 24,28 ****
  
  static void
! IcPointFixedBounds (int npoint, const IcPointFixed *points, PixRegionBox *bounds)
  {
      bounds->x1 = xFixedToInt (points->x);
--- 24,28 ----
  
  static void
! pixman_point_fixed_tBounds (int npoint, const pixman_point_fixed_t *points, pixman_box16_t *bounds)
  {
      bounds->x1 = xFixedToInt (points->x);
***************
*** 52,68 ****
  
  static void
! IcTriangleBounds (int ntri, const IcTriangle *tris, PixRegionBox *bounds)
  {
!     IcPointFixedBounds (ntri * 3, (IcPointFixed *) tris, bounds);
  }
  
  static void
! IcRasterizeTriangle (IcImage		*image,
! 		     const IcTriangle	*tri,
  		     int		x_off,
  		     int		y_off)
  {
!     const IcPointFixed	*top, *left, *right, *t;
!     IcTrapezoid		trap[2];
  
      top = &tri->p1;
--- 52,68 ----
  
  static void
! pixman_triangle_tBounds (int ntri, const pixman_triangle_t *tris, pixman_box16_t *bounds)
  {
!     pixman_point_fixed_tBounds (ntri * 3, (pixman_point_fixed_t *) tris, bounds);
  }
  
  static void
! IcRasterizeTriangle (pixman_image_t		*image,
! 		     const pixman_triangle_t	*tri,
  		     int		x_off,
  		     int		y_off)
  {
!     const pixman_point_fixed_t	*top, *left, *right, *t;
!     pixman_trapezoid_t		trap[2];
  
      top = &tri->p1;
***************
*** 136,161 ****
  
  void
! IcCompositeTriangles (IcOperator	op,
! 		      IcImage		*src,
! 		      IcImage		*dst,
  		      int		xSrc,
  		      int		ySrc,
! 		      const IcTriangle	*tris,
  		      int		ntris)
  {
!     PixRegionBox	bounds;
!     IcImage		*image = NULL;
      int		xDst, yDst;
      int		xRel, yRel;
!     IcFormat	*format;
      
      xDst = tris[0].p1.x >> 16;
      yDst = tris[0].p1.y >> 16;
  
!     format = IcFormatCreate (IcFormatNameA8);
      
      if (format)
      {
! 	IcTriangleBounds (ntris, tris, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
--- 136,161 ----
  
  void
! pixman_compositeTriangles (pixman_operator_t	op,
! 		      pixman_image_t		*src,
! 		      pixman_image_t		*dst,
  		      int		xSrc,
  		      int		ySrc,
! 		      const pixman_triangle_t	*tris,
  		      int		ntris)
  {
!     pixman_box16_t	bounds;
!     pixman_image_t		*image = NULL;
      int		xDst, yDst;
      int		xRel, yRel;
!     pixman_format_t	*format;
      
      xDst = tris[0].p1.x >> 16;
      yDst = tris[0].p1.y >> 16;
  
!     format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
      
      if (format)
      {
! 	pixman_triangle_tBounds (ntris, tris, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
***************
*** 171,175 ****
  	if (!format)
  	{
! 	    IcTriangleBounds (1, tris, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
--- 171,175 ----
  	if (!format)
  	{
! 	    pixman_triangle_tBounds (1, tris, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
***************
*** 186,193 ****
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    IcComposite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    IcImageDestroy (image);
  	}
  	/* XXX adjust xSrc and ySrc */
--- 186,193 ----
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    pixman_composite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    pixman_image_tDestroy (image);
  	}
  	/* XXX adjust xSrc and ySrc */
***************
*** 197,229 ****
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	IcComposite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	IcImageDestroy (image);
      }
  
!     IcFormatDestroy (format);
  }
  
  void
! IcCompositeTriStrip (IcOperator		op,
! 		     IcImage		*src,
! 		     IcImage		*dst,
  		     int		xSrc,
  		     int		ySrc,
! 		     const IcPointFixed	*points,
  		     int		npoints)
  {
!     IcTriangle		tri;
!     PixRegionBox	bounds;
!     IcImage		*image = NULL;
      int		xDst, yDst;
      int		xRel, yRel;
!     IcFormat	*format;
      
      xDst = points[0].x >> 16;
      yDst = points[0].y >> 16;
  
!     format = IcFormatCreate (IcFormatNameA8);
      
      if (npoints < 3)
--- 197,229 ----
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	pixman_composite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	pixman_image_tDestroy (image);
      }
  
!     pixman_format_tDestroy (format);
  }
  
  void
! pixman_compositeTriStrip (pixman_operator_t		op,
! 		     pixman_image_t		*src,
! 		     pixman_image_t		*dst,
  		     int		xSrc,
  		     int		ySrc,
! 		     const pixman_point_fixed_t	*points,
  		     int		npoints)
  {
!     pixman_triangle_t		tri;
!     pixman_box16_t	bounds;
!     pixman_image_t		*image = NULL;
      int		xDst, yDst;
      int		xRel, yRel;
!     pixman_format_t	*format;
      
      xDst = points[0].x >> 16;
      yDst = points[0].y >> 16;
  
!     format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
      
      if (npoints < 3)
***************
*** 231,235 ****
      if (format)
      {
! 	IcPointFixedBounds (npoints, points, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
--- 231,235 ----
      if (format)
      {
! 	pixman_point_fixed_tBounds (npoints, points, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
***************
*** 248,252 ****
  	if (!format)
  	{
! 	    IcTriangleBounds (1, &tri, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
--- 248,252 ----
  	if (!format)
  	{
! 	    pixman_triangle_tBounds (1, &tri, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
***************
*** 263,270 ****
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    IcComposite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    IcImageDestroy (image);
  	}
      }
--- 263,270 ----
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    pixman_composite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    pixman_image_tDestroy (image);
  	}
      }
***************
*** 273,306 ****
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	IcComposite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	IcImageDestroy (image);
      }
  
!     IcFormatDestroy (format);
  }
  
  void
! IcCompositeTriFan (IcOperator		op,
! 		   IcImage		*src,
! 		   IcImage		*dst,
  		   int			xSrc,
  		   int			ySrc,
! 		   const IcPointFixed	*points,
  		   int			npoints)
  {
!     IcTriangle		tri;
!     PixRegionBox	bounds;
!     IcImage		*image = NULL;
!     const IcPointFixed	*first;
      int		xDst, yDst;
      int		xRel, yRel;
!     IcFormat	*format;
      
      xDst = points[0].x >> 16;
      yDst = points[0].y >> 16;
  
!     format = IcFormatCreate (IcFormatNameA8);
      
      if (npoints < 3)
--- 273,306 ----
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	pixman_composite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	pixman_image_tDestroy (image);
      }
  
!     pixman_format_tDestroy (format);
  }
  
  void
! pixman_compositeTriFan (pixman_operator_t		op,
! 		   pixman_image_t		*src,
! 		   pixman_image_t		*dst,
  		   int			xSrc,
  		   int			ySrc,
! 		   const pixman_point_fixed_t	*points,
  		   int			npoints)
  {
!     pixman_triangle_t		tri;
!     pixman_box16_t	bounds;
!     pixman_image_t		*image = NULL;
!     const pixman_point_fixed_t	*first;
      int		xDst, yDst;
      int		xRel, yRel;
!     pixman_format_t	*format;
      
      xDst = points[0].x >> 16;
      yDst = points[0].y >> 16;
  
!     format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
      
      if (npoints < 3)
***************
*** 308,312 ****
      if (format)
      {
! 	IcPointFixedBounds (npoints, points, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
--- 308,312 ----
      if (format)
      {
! 	pixman_point_fixed_tBounds (npoints, points, &bounds);
  	if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  	    return;
***************
*** 327,331 ****
  	if (!format)
  	{
! 	    IcTriangleBounds (1, &tri, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
--- 327,331 ----
  	if (!format)
  	{
! 	    pixman_triangle_tBounds (1, &tri, &bounds);
  	    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
  		continue;
***************
*** 342,349 ****
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    IcComposite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    IcImageDestroy (image);
  	}
      }
--- 342,349 ----
  	    xRel = bounds.x1 + xSrc - xDst;
  	    yRel = bounds.y1 + ySrc - yDst;
! 	    pixman_composite (op, src, image, dst,
  			 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  			 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	    pixman_image_tDestroy (image);
  	}
      }
***************
*** 352,362 ****
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	IcComposite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	IcImageDestroy (image);
      }
  
!     IcFormatDestroy (format);
  }
  
--- 352,362 ----
  	xRel = bounds.x1 + xSrc - xDst;
  	yRel = bounds.y1 + ySrc - yDst;
! 	pixman_composite (op, src, image, dst,
  		     xRel, yRel, 0, 0, bounds.x1, bounds.y1,
  		     bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
! 	pixman_image_tDestroy (image);
      }
  
!     pixman_format_tDestroy (format);
  }
  





More information about the cairo-commit mailing list