[cairo-commit] libpixman/src icformat.c, 1.9, 1.10 icimage.c, 1.18, 1.19 icimage.h, 1.17, 1.18 icint.h, 1.18, 1.19 icrect.c, 1.9, 1.10 ictrap.c, 1.12, 1.13 pixman.h, 1.12, 1.13 pixregion.c, 1.8, 1.9 pixregionint.h, 1.6, 1.7

Carl Worth commit at pdx.freedesktop.org
Fri Apr 16 08:32:56 PDT 2004


Committed by: cworth

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

Modified Files:
	icformat.c icimage.c icimage.h icint.h icrect.c ictrap.c 
	pixman.h pixregion.c pixregionint.h 
Log Message:

        * src/ictrap.c (IcCreateAlphaPicture):
        * src/icrect.c (pixman_color_rects):
        * src/pixregion.c (pixman_region16_print, pixman_region16_valid):
        * src/icint.h (IcBitsMask):
        * src/icimage.h:
        * src/icimage.c (pixman_image_change):
        * src/icformat.c (pixman_format_create):
        * src/pixman.h: Fix bogus names such as PIXMAN_FORMAT_NAME_AR_GB32
        that were left over from a broken search-and-replace. Normalize
        structure defintions, (eg. struct _pixman_region16_t -> struct
        pixman_region16). Normalize indentation.

        * AUTHORS: Fix alphabetization.


Index: icformat.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icformat.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** a/icformat.c	10 Dec 2003 23:39:50 -0000	1.9
--- b/icformat.c	16 Apr 2004 15:32:53 -0000	1.10
***************
*** 27,34 ****
  
  pixman_format_t *
! pixman_format_create (pixman_format_tName name)
  {
      switch (name) {
!     case PIXMAN_FORMAT_NAME_AR_GB32:
  	return pixman_format_create_masks (32,
  				    0xff000000,
--- 27,34 ----
  
  pixman_format_t *
! pixman_format_create (pixman_format_name_t name)
  {
      switch (name) {
!     case PIXMAN_FORMAT_NAME_ARGB32:
  	return pixman_format_create_masks (32,
  				    0xff000000,
***************
*** 36,40 ****
  				    0x0000ff00,
  				    0x000000ff);
!     case PIXMAN_FORMAT_NAME_RG_B24:
  	return pixman_format_create_masks (32,
  				    0x0,
--- 36,40 ----
  				    0x0000ff00,
  				    0x000000ff);
!     case PIXMAN_FORMAT_NAME_RGB24:
  	return pixman_format_create_masks (32,
  				    0x0,

Index: icimage.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icimage.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** a/icimage.c	10 Dec 2003 23:39:56 -0000	1.18
--- b/icimage.c	16 Apr 2004 15:32:53 -0000	1.19
***************
*** 347,351 ****
  
  int
! pixman_image_tChange (pixman_image_t		*image,
  	       Mask		vmask,
  	       unsigned int	*vlist,
--- 347,351 ----
  
  int
! pixman_image_change (pixman_image_t		*image,
  	       Mask		vmask,
  	       unsigned int	*vlist,
***************
*** 414,418 ****
  		    clipType = CT_NONE;
  		}
! 		error = pixman_image_tChangeClip (image, clipType,
  					   (void *)mask, 0);
  		break;
--- 414,418 ----
  		    clipType = CT_NONE;
  		}
! 		error = pixman_image_change_clip (image, clipType,
  					   (void *)mask, 0);
  		break;

Index: icimage.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/icimage.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** a/icimage.h	10 Dec 2003 23:23:37 -0000	1.17
--- b/icimage.h	16 Apr 2004 15:32:53 -0000	1.18
***************
*** 77,81 ****
  
  /*
! typedef struct _pixman_format_t {
      uint32_t	    id;
      uint32_t	    format;
--- 77,81 ----
  
  /*
! typedef struct pixman_format {
      uint32_t	    id;
      uint32_t	    format;
***************
*** 84,91 ****
      DirectFormatRec direct;
      IndexFormatRec  index;
! } pixman_format_tRec;
  */
  
! struct _pixman_image_t {
      IcPixels	    *pixels;
      pixman_format_t	    image_format;
--- 84,91 ----
      DirectFormatRec direct;
      IndexFormatRec  index;
! } pixman_format_t;
  */
  
! struct pixman_image {
      IcPixels	    *pixels;
      pixman_format_t	    image_format;
***************
*** 104,108 ****
      unsigned int    unused : 23;
  
!     struct _pixman_image_t *alphaMap;
      IcPoint	    alphaOrigin;
  
--- 104,108 ----
      unsigned int    unused : 23;
  
!     struct pixman_image *alphaMap;
      IcPoint	    alphaOrigin;
  
***************
*** 315,329 ****
  extern void __internal_linkage
  pixman_compositeGeneral (pixman_operator_t	op,
! 		    pixman_image_t	*iSrc,
! 		    pixman_image_t	*iMask,
! 		    pixman_image_t	*iDst,
! 		    int16_t	xSrc,
! 		    int16_t	ySrc,
! 		    int16_t	xMask,
! 		    int16_t	yMask,
! 		    int16_t	xDst,
! 		    int16_t	yDst,
! 		    uint16_t	width,
! 		    uint16_t	height);
  
  #endif /* _IC_MIPICT_H_ */
--- 315,329 ----
  extern void __internal_linkage
  pixman_compositeGeneral (pixman_operator_t	op,
! 			 pixman_image_t	*iSrc,
! 			 pixman_image_t	*iMask,
! 			 pixman_image_t	*iDst,
! 			 int16_t	xSrc,
! 			 int16_t	ySrc,
! 			 int16_t	xMask,
! 			 int16_t	yMask,
! 			 int16_t	xDst,
! 			 int16_t	yDst,
! 			 uint16_t	width,
! 			 uint16_t	height);
  
  #endif /* _IC_MIPICT_H_ */

Index: icint.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/icint.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** a/icint.h	12 Dec 2003 18:47:59 -0000	1.18
--- b/icint.h	16 Apr 2004 15:32:53 -0000	1.19
***************
*** 110,114 ****
      
  #define IcStipStrideToBitsStride(s) (((s) >> (IC_SHIFT - IC_STIP_SHIFT)))
! #define pixman_bits_tStrideToStipStride(s) (((s) << (IC_SHIFT - IC_STIP_SHIFT)))
      
  #define IcFullMask(n)   ((n) == IC_UNIT ? IC_ALLONES : ((((pixman_bits_t) 1) << n) - 1))
--- 110,114 ----
      
  #define IcStipStrideToBitsStride(s) (((s) >> (IC_SHIFT - IC_STIP_SHIFT)))
! #define IcBitsStrideToStipStride(s) (((s) << (IC_SHIFT - IC_STIP_SHIFT)))
      
  #define IcFullMask(n)   ((n) == IC_UNIT ? IC_ALLONES : ((((pixman_bits_t) 1) << n) - 1))
***************
*** 165,169 ****
  			     IcScrLeft(IC_STIP_ALLONES,(IC_STIP_UNIT - (x)) & IC_STIP_MASK) : 0)
  
! #define pixman_bits_tMask(x,w)	(IcScrRight(IC_ALLONES,(x) & IC_MASK) & \
  			 IcScrLeft(IC_ALLONES,(IC_UNIT - ((x) + (w))) & IC_MASK))
  
--- 165,169 ----
  			     IcScrLeft(IC_STIP_ALLONES,(IC_STIP_UNIT - (x)) & IC_STIP_MASK) : 0)
  
! #define IcBitsMask(x,w)	(IcScrRight(IC_ALLONES,(x) & IC_MASK) & \
  			 IcScrLeft(IC_ALLONES,(IC_UNIT - ((x) + (w))) & IC_MASK))
  
***************
*** 706,710 ****
  
  /* XXX: Is depth redundant here? */
! struct _pixman_format_t {
      int		format_code;
      int		depth;
--- 706,710 ----
  
  /* XXX: Is depth redundant here? */
! struct pixman_format {
      int		format_code;
      int		depth;

Index: icrect.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icrect.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** a/icrect.c	10 Dec 2003 23:23:55 -0000	1.9
--- b/icrect.c	16 Apr 2004 15:32:53 -0000	1.10
***************
*** 25,29 ****
  /* XXX: I haven't ported this yet
  static void
! pixman_color_tRects (pixman_image_t	 *dst,
  	      pixman_image_t	 *clipPict,
  	      pixman_color_t	 *color,
--- 25,29 ----
  /* XXX: I haven't ported this yet
  static void
! pixman_color_rects (pixman_image_t	 *dst,
  	      pixman_image_t	 *clipPict,
  	      pixman_color_t	 *color,
***************
*** 109,117 ****
  
  /* XXX: Really need this to optimize solid rectangles
!     if (op == pixman_operator_tSource || op == PIXMAN_OPERATOR_CLEAR)
      {
! 	pixman_color_tRects (dst, dst, &color_s, nRects, rects, 0, 0);
  	if (dst->alphaMap)
! 	    pixman_color_tRects (dst->alphaMap, dst,
  			  &color_s, nRects, rects,
  			  dst->alphaOrigin.x,
--- 109,117 ----
  
  /* XXX: Really need this to optimize solid rectangles
!     if (op == PIXMAN_OPERATOR_SOURCE || op == PIXMAN_OPERATOR_CLEAR)
      {
! 	pixman_color_rects (dst, dst, &color_s, nRects, rects, 0, 0);
  	if (dst->alphaMap)
! 	    pixman_color_rects (dst->alphaMap, dst,
  			  &color_s, nRects, rects,
  			  dst->alphaOrigin.x,

Index: ictrap.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictrap.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** a/ictrap.c	10 Dec 2003 23:40:03 -0000	1.12
--- b/ictrap.c	16 Apr 2004 15:32:53 -0000	1.13
***************
*** 59,63 ****
  
      /* XXX: Is this a reasonable way to clear the image? Would
!        probably be preferable to use pixman_image_tFillRectangle once such a
         beast exists. */
      memset (image->pixels->data, 0, height * image->pixels->stride);
--- 59,63 ----
  
      /* XXX: Is this a reasonable way to clear the image? Would
!        probably be preferable to use pixman_image_fill_rectangle once such a
         beast exists. */
      memset (image->pixels->data, 0, height * image->pixels->stride);

Index: pixman.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/pixman.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** a/pixman.h	23 Jan 2004 05:05:08 -0000	1.12
--- b/pixman.h	16 Apr 2004 15:32:53 -0000	1.13
***************
*** 99,105 ****
  /* pixregion.h */
  
! typedef struct _pixman_region16_t pixman_region16_t;
  
! typedef struct _pixman_box16_t {
      short x1, y1, x2, y2;
  } pixman_box16_t;
--- 99,105 ----
  /* pixregion.h */
  
! typedef struct pixman_region16 pixman_region16_t;
  
! typedef struct pixman_box16 {
      short x1, y1, x2, y2;
  } pixman_box16_t;
***************
*** 137,141 ****
  pixman_region_status_t
  pixman_region_union_rect(pixman_region16_t *dest, pixman_region16_t *source,
! 		   int x, int y, unsigned int width, unsigned int height);
  
  pixman_region_status_t
--- 137,141 ----
  pixman_region_status_t
  pixman_region_union_rect(pixman_region16_t *dest, pixman_region16_t *source,
! 			 int x, int y, unsigned int width, unsigned int height);
  
  pixman_region_status_t
***************
*** 152,156 ****
  /* querying */
  
! /* XXX: These should proably be combined: pixman_region16_tGetRects? */
  int
  pixman_region_num_rects (pixman_region16_t *region);
--- 152,156 ----
  /* querying */
  
! /* XXX: These should proably be combined: pixman_region_get_rects? */
  int
  pixman_region_num_rects (pixman_region16_t *region);
***************
*** 201,205 ****
  
  /* icformat.c */
! typedef enum _pixman_operator_t {
      PIXMAN_OPERATOR_CLEAR,
      PIXMAN_OPERATOR_SRC,
--- 201,205 ----
  
  /* icformat.c */
! typedef enum pixman_operator {
      PIXMAN_OPERATOR_CLEAR,
      PIXMAN_OPERATOR_SRC,
***************
*** 218,240 ****
  } pixman_operator_t;
  
! 
! typedef enum _pixman_format_tName {
!     PIXMAN_FORMAT_NAME_AR_GB32,
!     PIXMAN_FORMAT_NAME_RG_B24,
      PIXMAN_FORMAT_NAME_A8,
      PIXMAN_FORMAT_NAME_A1
! } pixman_format_tName;
  
! typedef struct _pixman_format_t pixman_format_t;
  
  pixman_format_t *
! pixman_format_create (pixman_format_tName name);
  
  pixman_format_t *
  pixman_format_create_masks (int bpp,
! 		     int alpha_mask,
! 		     int red_mask,
! 		     int green_mask,
! 		     int blue_mask);
  
  void
--- 218,239 ----
  } pixman_operator_t;
  
! typedef enum pixman_format_name {
!     PIXMAN_FORMAT_NAME_ARGB32,
!     PIXMAN_FORMAT_NAME_RGB24,
      PIXMAN_FORMAT_NAME_A8,
      PIXMAN_FORMAT_NAME_A1
! } pixman_format_name_t;
  
! typedef struct pixman_format pixman_format_t;
  
  pixman_format_t *
! pixman_format_create (pixman_format_name_t name);
  
  pixman_format_t *
  pixman_format_create_masks (int bpp,
! 			    int alpha_mask,
! 			    int red_mask,
! 			    int green_mask,
! 			    int blue_mask);
  
  void
***************
*** 243,252 ****
  /* icimage.c */
  
! typedef struct _pixman_image_t	pixman_image_t;
  
  pixman_image_t *
  pixman_image_create (pixman_format_t	*format,
! 	       int	width,
! 	       int	height);
  
  /*
--- 242,251 ----
  /* icimage.c */
  
! typedef struct pixman_image pixman_image_t;
  
  pixman_image_t *
  pixman_image_create (pixman_format_t	*format,
! 		     int	width,
! 		     int	height);
  
  /*
***************
*** 270,274 ****
  
  pixman_image_t *
! pixman_image_create_for_data (pixman_bits_t *data, pixman_format_t *format, int width, int height, int bpp, int stride);
  
  void
--- 269,276 ----
  
  pixman_image_t *
! pixman_image_create_for_data (pixman_bits_t *data,
! 			      pixman_format_t *format,
! 			      int width, int height,
! 			      int bpp, int stride);
  
  void
***************
*** 277,289 ****
  int
  pixman_image_set_clip_region (pixman_image_t	*image,
! 		      pixman_region16_t	*region);
  
  typedef int pixman_fixed16_16_t;
  
! typedef struct _pixman_point_fixed_t {
      pixman_fixed16_16_t  x, y;
  } pixman_point_fixed_t;
  
! typedef struct _pixman_line_fixed_t {
      pixman_point_fixed_t	p1, p2;
  } pixman_line_fixed_t;
--- 279,291 ----
  int
  pixman_image_set_clip_region (pixman_image_t	*image,
! 			      pixman_region16_t	*region);
  
  typedef int pixman_fixed16_16_t;
  
! typedef struct pixman_point_fixed {
      pixman_fixed16_16_t  x, y;
  } pixman_point_fixed_t;
  
! typedef struct pixman_line_fixed {
      pixman_point_fixed_t	p1, p2;
  } pixman_line_fixed_t;
***************
*** 292,314 ****
     datatypes have fixed-point values. (Though by design,
     pixman_fill_rectangles is designed to fill only whole pixels) */
! typedef struct _pixman_rectangle_t {
      short x, y;
      unsigned short width, height;
  } pixman_rectangle_t;
  
! typedef struct _pixman_triangle_t {
      pixman_point_fixed_t	p1, p2, p3;
  } pixman_triangle_t;
  
! typedef struct _pixman_trapezoid_t {
      pixman_fixed16_16_t  top, bottom;
      pixman_line_fixed_t	left, right;
  } pixman_trapezoid_t;
  
! typedef struct _pixman_vector_t {
      pixman_fixed16_16_t    vector[3];
  } pixman_vector_t;
  
! typedef struct _pixman_transform_t {
      pixman_fixed16_16_t  matrix[3][3];
  } pixman_transform_t;
--- 294,316 ----
     datatypes have fixed-point values. (Though by design,
     pixman_fill_rectangles is designed to fill only whole pixels) */
! typedef struct pixman_rectangle {
      short x, y;
      unsigned short width, height;
  } pixman_rectangle_t;
  
! typedef struct pixman_triangle {
      pixman_point_fixed_t	p1, p2, p3;
  } pixman_triangle_t;
  
! typedef struct pixman_trapezoid {
      pixman_fixed16_16_t  top, bottom;
      pixman_line_fixed_t	left, right;
  } pixman_trapezoid_t;
  
! typedef struct pixman_vector {
      pixman_fixed16_16_t    vector[3];
  } pixman_vector_t;
  
! typedef struct pixman_transform {
      pixman_fixed16_16_t  matrix[3][3];
  } pixman_transform_t;
***************
*** 323,336 ****
  
  int
! pixman_image_set_transform (pixman_image_t		*image,
! 		     pixman_transform_t	*transform);
  
  void
  pixman_image_set_repeat (pixman_image_t	*image,
! 		  int		repeat);
  
  void
! pixman_image_set_filter (pixman_image_t	*image,
! 		  pixman_filter_t	filter);
  
  int
--- 325,338 ----
  
  int
! pixman_image_set_transform (pixman_image_t	*image,
! 			    pixman_transform_t	*transform);
  
  void
  pixman_image_set_repeat (pixman_image_t	*image,
! 			 int		repeat);
  
  void
! pixman_image_set_filter (pixman_image_t		*image,
! 			 pixman_filter_t	filter);
  
  int
***************
*** 354,359 ****
  /* iccolor.c */
  
! /* XXX: Do we really need a struct here? Only pixman_rectangle_ts uses this. */
! typedef struct {
      unsigned short   red;
      unsigned short   green;
--- 356,361 ----
  /* iccolor.c */
  
! /* XXX: Do we really need a struct here? Only pixman_rectangle_t uses this. */
! typedef struct pixman_color {
      unsigned short   red;
      unsigned short   green;
***************
*** 364,374 ****
  void
  pixman_color_to_pixel (const pixman_format_t	*format,
! 		const pixman_color_t	*color,
! 		pixman_bits_t		*pixel);
  
  void
  pixman_pixel_to_color (const pixman_format_t	*format,
! 		pixman_bits_t		pixel,
! 		pixman_color_t		*color);
  
  /* icrect.c */
--- 366,376 ----
  void
  pixman_color_to_pixel (const pixman_format_t	*format,
! 		       const pixman_color_t	*color,
! 		       pixman_bits_t		*pixel);
  
  void
  pixman_pixel_to_color (const pixman_format_t	*format,
! 		       pixman_bits_t		pixel,
! 		       pixman_color_t		*color);
  
  /* icrect.c */
***************
*** 376,434 ****
  void
  pixman_fill_rectangle (pixman_operator_t	op,
! 		 pixman_image_t	*dst,
! 		 const pixman_color_t	*color,
! 		 int		x,
! 		 int		y,
! 		 unsigned int	width,
! 		 unsigned int	height);
  
  void
  pixman_fill_rectangles (pixman_operator_t		op,
! 		  pixman_image_t		*dst,
! 		  const pixman_color_t		*color,
! 		  const pixman_rectangle_t	*rects,
! 		  int			nRects);
  
  /* ictrap.c */
  
- /* XXX: Switch to enum for op */
  void
! pixman_composite_trapezoids (pixman_operator_t	op,
! 		       pixman_image_t		*src,
! 		       pixman_image_t		*dst,
! 		       int		xSrc,
! 		       int		ySrc,
! 		       const pixman_trapezoid_t *traps,
! 		       int		ntrap);
  
  /* ictri.c */
  
  void
! pixman_composite_triangles (pixman_operator_t	op,
! 		      pixman_image_t		*src,
! 		      pixman_image_t		*dst,
! 		      int		xSrc,
! 		      int		ySrc,
! 		      const pixman_triangle_t	*tris,
! 		      int		ntris);
  
  void
  pixman_composite_tri_strip (pixman_operator_t		op,
! 		     pixman_image_t		*src,
! 		     pixman_image_t		*dst,
! 		     int		xSrc,
! 		     int		ySrc,
! 		     const pixman_point_fixed_t	*points,
! 		     int		npoints);
  
  
  void
  pixman_composite_tri_fan (pixman_operator_t		op,
! 		   pixman_image_t		*src,
! 		   pixman_image_t		*dst,
! 		   int			xSrc,
! 		   int			ySrc,
! 		   const pixman_point_fixed_t	*points,
! 		   int			npoints);
  
  /* ic.c */
--- 378,435 ----
  void
  pixman_fill_rectangle (pixman_operator_t	op,
! 		       pixman_image_t		*dst,
! 		       const pixman_color_t	*color,
! 		       int			x,
! 		       int			y,
! 		       unsigned int		width,
! 		       unsigned int		height);
  
  void
  pixman_fill_rectangles (pixman_operator_t		op,
! 			pixman_image_t			*dst,
! 			const pixman_color_t		*color,
! 			const pixman_rectangle_t	*rects,
! 			int				nRects);
  
  /* ictrap.c */
  
  void
! pixman_composite_trapezoids (pixman_operator_t		op,
! 			     pixman_image_t		*src,
! 			     pixman_image_t		*dst,
! 			     int			xSrc,
! 			     int			ySrc,
! 			     const pixman_trapezoid_t *traps,
! 			     int			ntrap);
  
  /* ictri.c */
  
  void
! pixman_composite_triangles (pixman_operator_t		op,
! 			    pixman_image_t		*src,
! 			    pixman_image_t		*dst,
! 			    int				xSrc,
! 			    int				ySrc,
! 			    const pixman_triangle_t	*tris,
! 			    int				ntris);
  
  void
  pixman_composite_tri_strip (pixman_operator_t		op,
! 			    pixman_image_t		*src,
! 			    pixman_image_t		*dst,
! 			    int				xSrc,
! 			    int				ySrc,
! 			    const pixman_point_fixed_t	*points,
! 			    int				npoints);
  
  
  void
  pixman_composite_tri_fan (pixman_operator_t		op,
! 			  pixman_image_t		*src,
! 			  pixman_image_t		*dst,
! 			  int				xSrc,
! 			  int				ySrc,
! 			  const pixman_point_fixed_t	*points,
! 			  int				npoints);
  
  /* ic.c */
***************
*** 436,450 ****
  void
  pixman_composite (pixman_operator_t	op,
! 	     pixman_image_t	*iSrc,
! 	     pixman_image_t    *iMask,
! 	     pixman_image_t    *iDst,
! 	     int      	xSrc,
! 	     int      	ySrc,
! 	     int      	xMask,
! 	     int      	yMask,
! 	     int      	xDst,
! 	     int      	yDst,
! 	     int	width,
! 	     int	height);
  
  
--- 437,451 ----
  void
  pixman_composite (pixman_operator_t	op,
! 		  pixman_image_t	*iSrc,
! 		  pixman_image_t	*iMask,
! 		  pixman_image_t	*iDst,
! 		  int      		xSrc,
! 		  int      		ySrc,
! 		  int      		xMask,
! 		  int      		yMask,
! 		  int      		xDst,
! 		  int      		yDst,
! 		  int			width,
! 		  int			height);
  
  

Index: pixregion.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/pixregion.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** a/pixregion.c	12 Dec 2003 18:47:59 -0000	1.8
--- b/pixregion.c	16 Apr 2004 15:32:53 -0000	1.9
***************
*** 69,73 ****
  #endif
  
! #define good(reg) assert(pixman_region16_tValidRegion(reg))
  
  #define MIN(a,b) ((a) < (b) ? (a) : (b))
--- 69,73 ----
  #endif
  
! #define good(reg) assert(pixman_region16_valid(reg))
  
  #define MIN(a,b) ((a) < (b) ? (a) : (b))
***************
*** 75,81 ****
  
  static pixman_box16_t pixman_region_emptyBox = {0, 0, 0, 0};
! static pixman_region16_tData pixman_region_emptyData = {0, 0};
  
! static pixman_region16_tData  pixman_brokendata = {0, 0};
  static pixman_region16_t   pixman_brokenregion = { { 0, 0, 0, 0 }, &pixman_brokendata };
  
--- 75,81 ----
  
  static pixman_box16_t pixman_region_emptyBox = {0, 0, 0, 0};
! static pixman_region16_data_t pixman_region_emptyData = {0, 0};
  
! static pixman_region16_data_t  pixman_brokendata = {0, 0};
  static pixman_region16_t   pixman_brokenregion = { { 0, 0, 0, 0 }, &pixman_brokendata };
  
***************
*** 199,204 ****
  if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
  {									 \
!     pixman_region16_tData * NewData;							 \
!     NewData = (pixman_region16_tData *)realloc((reg)->data, PIXREGION_SZOF(numRects));	 \
      if (NewData)							 \
      {									 \
--- 199,204 ----
  if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
  {									 \
!     pixman_region16_data_t * NewData;							 \
!     NewData = (pixman_region16_data_t *)realloc((reg)->data, PIXREGION_SZOF(numRects));	 \
      if (NewData)							 \
      {									 \
***************
*** 211,215 ****
  #ifdef DEBUG
  int
! pixman_region16_tPrintRegion(rgn)
      pixman_region16_t * rgn;
  {
--- 211,215 ----
  #ifdef DEBUG
  int
! pixman_region16_print(rgn)
      pixman_region16_t * rgn;
  {
***************
*** 258,262 ****
  
  pixman_region_status_t
! pixman_region16_tValidRegion(reg)
      pixman_region16_t * reg;
  {
--- 258,262 ----
  
  pixman_region_status_t
! pixman_region16_valid(reg)
      pixman_region16_t * reg;
  {
***************
*** 393,397 ****
  pixman_rect_alloc(pixman_region16_t * region, int n)
  {
!     pixman_region16_tData *data;
      
      if (!region->data)
--- 393,397 ----
  pixman_rect_alloc(pixman_region16_t * region, int n)
  {
!     pixman_region16_data_t *data;
      
      if (!region->data)
***************
*** 420,424 ****
  	}
  	n += region->data->numRects;
! 	data = (pixman_region16_tData *)realloc(region->data, PIXREGION_SZOF(n));
  	if (!data)
  	    return pixman_break (region);
--- 420,424 ----
  	}
  	n += region->data->numRects;
! 	data = (pixman_region16_data_t *)realloc(region->data, PIXREGION_SZOF(n));
  	if (!data)
  	    return pixman_break (region);
***************
*** 672,676 ****
      short	    ybot;		    /* Bottom of intersection	     */
      short	    ytop;		    /* Top of intersection	     */
!     pixman_region16_tData *	    oldData;		    /* Old data for newReg	     */
      int		    prevBand;		    /* Index of start of
  					     * previous band in newReg       */
--- 672,676 ----
      short	    ybot;		    /* Bottom of intersection	     */
      short	    ytop;		    /* Top of intersection	     */
!     pixman_region16_data_t *	    oldData;		    /* Old data for newReg	     */
      int		    prevBand;		    /* Index of start of
  					     * previous band in newReg       */
***************
*** 709,713 ****
      assert(r2 != r2End);
  
!     oldData = (pixman_region16_tData *)NULL;
      if (((newReg == reg1) && (newSize > 1)) ||
  	((newReg == reg2) && (numRects > 1)))
--- 709,713 ----
      assert(r2 != r2End);
  
!     oldData = (pixman_region16_data_t *)NULL;
      if (((newReg == reg1) && (newSize > 1)) ||
  	((newReg == reg2) && (numRects > 1)))
***************
*** 863,867 ****
  	newReg->extents = *PIXREGION_BOXPTR(newReg);
  	freeData(newReg);
! 	newReg->data = (pixman_region16_tData *)NULL;
      }
      else
--- 863,867 ----
  	newReg->extents = *PIXREGION_BOXPTR(newReg);
  	freeData(newReg);
! 	newReg->data = (pixman_region16_data_t *)NULL;
      }
      else
***************
*** 1027,1031 ****
  	newReg->extents.y2 = MIN(reg1->extents.y2, reg2->extents.y2);
  	freeData(newReg);
! 	newReg->data = (pixman_region16_tData *)NULL;
      }
      else if (!reg2->data && SUBSUMES(&reg2->extents, &reg1->extents))
--- 1027,1031 ----
  	newReg->extents.y2 = MIN(reg1->extents.y2, reg2->extents.y2);
  	freeData(newReg);
! 	newReg->data = (pixman_region16_data_t *)NULL;
      }
      else if (!reg2->data && SUBSUMES(&reg2->extents, &reg1->extents))
***************
*** 1279,1283 ****
      {
  	dstrgn->extents = rgn->extents;
! 	dstrgn->data = (pixman_region16_tData *)NULL;
  	return PIXMAN_REGION_STATUS_SUCCESS;
      }
--- 1279,1283 ----
      {
  	dstrgn->extents = rgn->extents;
! 	dstrgn->data = (pixman_region16_data_t *)NULL;
  	return PIXMAN_REGION_STATUS_SUCCESS;
      }
***************
*** 1494,1498 ****
  	{
  	    freeData(badreg);
! 	    badreg->data = (pixman_region16_tData *) NULL;
  	}
  	else
--- 1494,1498 ----
  	{
  	    freeData(badreg);
! 	    badreg->data = (pixman_region16_data_t *) NULL;
  	}
  	else
***************
*** 1585,1589 ****
  	rit->curBand = 0;
  	rit->reg.extents = *box;
! 	rit->reg.data = (pixman_region16_tData *)NULL;
  	if (!pixman_rect_alloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */
  	    goto bail;
--- 1585,1589 ----
  	rit->curBand = 0;
  	rit->reg.extents = *box;
! 	rit->reg.data = (pixman_region16_data_t *)NULL;
  	if (!pixman_rect_alloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */
  	    goto bail;
***************
*** 1604,1608 ****
  	{
  	    freeData(reg);
! 	    reg->data = (pixman_region16_tData *)NULL;
  	}
      }
--- 1604,1608 ----
  	{
  	    freeData(reg);
! 	    reg->data = (pixman_region16_data_t *)NULL;
  	}
      }
***************
*** 1649,1653 ****
  {
      pixman_region16_t *	region;
!     pixman_region16_tData *	pData;
      pixman_box16_t *	box;
      int        i;
--- 1649,1653 ----
  {
      pixman_region16_t *	region;
!     pixman_region16_data_t *	pData;
      pixman_box16_t *	box;
      int        i;
***************
*** 1673,1677 ****
  	    region->extents.x2 = x2;
  	    region->extents.y2 = y2;
! 	    region->data = (pixman_region16_tData *)NULL;
  	}
  	return region;
--- 1673,1677 ----
  	    region->extents.x2 = x2;
  	    region->extents.y2 = y2;
! 	    region->data = (pixman_region16_data_t *)NULL;
  	}
  	return region;
***************
*** 1952,1956 ****
  	newReg->extents = *invRect;
  	freeData(newReg);
! 	newReg->data = (pixman_region16_tData *)NULL;
          return PIXMAN_REGION_STATUS_SUCCESS;
      }
--- 1952,1956 ----
  	newReg->extents = *invRect;
  	freeData(newReg);
! 	newReg->data = (pixman_region16_data_t *)NULL;
          return PIXMAN_REGION_STATUS_SUCCESS;
      }
***************
*** 1960,1964 ****
         just throw away rectangles in region 2 that aren't in region 1 */
      invReg.extents = *invRect;
!     invReg.data = (pixman_region16_tData *)NULL;
      if (!pixman_op(newReg, &invReg, reg1, pixman_region_subtractO, PIXMAN_REGION_STATUS_SUCCESS, PIXMAN_REGION_STATUS_FAILURE, &overlap))
  	return PIXMAN_REGION_STATUS_FAILURE;
--- 1960,1964 ----
         just throw away rectangles in region 2 that aren't in region 1 */
      invReg.extents = *invRect;
!     invReg.data = (pixman_region16_data_t *)NULL;
      if (!pixman_op(newReg, &invReg, reg1, pixman_region_subtractO, PIXMAN_REGION_STATUS_SUCCESS, PIXMAN_REGION_STATUS_FAILURE, &overlap))
  	return PIXMAN_REGION_STATUS_FAILURE;
***************
*** 2163,2167 ****
  		region->extents = *PIXREGION_BOXPTR(region);
  		freeData(region);
! 		region->data = (pixman_region16_tData *)NULL;
  	    }
  	    else
--- 2163,2167 ----
  		region->extents = *PIXREGION_BOXPTR(region);
  		freeData(region);
! 		region->data = (pixman_region16_data_t *)NULL;
  	    }
  	    else
***************
*** 2173,2177 ****
  /* XXX: Do we need this?
  static pixman_region_status_t
! pixman_region16_tDataCopy(pixman_region16_t * dst, pixman_region16_t * src)
  {
      good(dst);
--- 2173,2177 ----
  /* XXX: Do we need this?
  static pixman_region_status_t
! pixman_region16_data_copy(pixman_region16_t * dst, pixman_region16_t * src)
  {
      good(dst);
***************
*** 2184,2188 ****
      {
  	freeData(dst);
! 	dst->data = (pixman_region16_tData *)NULL;
  	return PIXMAN_REGION_STATUS_SUCCESS;
      }
--- 2184,2188 ----
      {
  	freeData(dst);
! 	dst->data = (pixman_region16_data_t *)NULL;
  	return PIXMAN_REGION_STATUS_SUCCESS;
      }
***************
*** 2208,2212 ****
      region->extents = *box;
      freeData(region);
!     region->data = (pixman_region16_tData *)NULL;
  }
  
--- 2208,2212 ----
      region->extents = *box;
      freeData(region);
!     region->data = (pixman_region16_data_t *)NULL;
  }
  
***************
*** 2255,2259 ****
  /* XXX: Do we need this?
  static int
! pixman_region16_tBroken(pixman_region16_t * region)
  {
      good(region);
--- 2255,2259 ----
  /* XXX: Do we need this?
  static int
! pixman_region16_broken(pixman_region16_t * region)
  {
      good(region);
***************
*** 2283,2287 ****
  #define ExchangeSpans(a, b)				    \
  {							    \
!     pixman_region16_tPoint tpt;					    \
      int    tw;						    \
  							    \
--- 2283,2287 ----
  #define ExchangeSpans(a, b)				    \
  {							    \
!     pixman_region16_point_t tpt;					    \
      int    tw;						    \
  							    \
***************
*** 2296,2300 ****
  
  static void QuickSortSpans(
!     pixman_region16_tPoint spans[],
      int	    widths[],
      int	    numSpans)
--- 2296,2300 ----
  
  static void QuickSortSpans(
!     pixman_region16_point_t spans[],
      int	    widths[],
      int	    numSpans)
***************
*** 2302,2306 ****
      int	    y;
      int	    i, j, m;
!     pixman_region16_tPoint *r;
  
      /* Always called with numSpans > 1 */
--- 2302,2306 ----
      int	    y;
      int	    i, j, m;
!     pixman_region16_point_t *r;
  
      /* Always called with numSpans > 1 */
***************
*** 2322,2326 ****
  		{
  		    /* spans[i] is out of order.  Move into proper location. */
! 		    pixman_region16_tPoint tpt;
  		    int	    tw, k;
  
--- 2322,2326 ----
  		{
  		    /* spans[i] is out of order.  Move into proper location. */
! 		    pixman_region16_point_t tpt;
  		    int	    tw, k;
  
***************
*** 2401,2414 ****
  #ifdef XXX_DO_WE_NEED_THIS
  static int
! pixman_region16_tClipSpans(
      pixman_region16_t 		*prgnDst,
!     pixman_region16_tPoint 	*ppt,
      int	    		*pwidth,
      int			nspans,
!     pixman_region16_tPoint 	*pptNew,
      int			*pwidthNew,
      int			fSorted)
  {
!     pixman_region16_tPoint 	*pptLast;
      int			*pwidthNewStart;	/* the vengeance of Xerox! */
      int	y, x1, x2;
--- 2401,2414 ----
  #ifdef XXX_DO_WE_NEED_THIS
  static int
! pixman_region16_clip_spans(
      pixman_region16_t 		*prgnDst,
!     pixman_region16_point_t 	*ppt,
      int	    		*pwidth,
      int			nspans,
!     pixman_region16_point_t 	*pptNew,
      int			*pwidthNew,
      int			fSorted)
  {
!     pixman_region16_point_t 	*pptLast;
      int			*pwidthNewStart;	/* the vengeance of Xerox! */
      int	y, x1, x2;
***************
*** 2518,2522 ****
  /* find the band in a region with the most rectangles */
  static int
! pixman_region16_tFindMaxBand(pixman_region16_t * prgn)
  {
      int nbox;
--- 2518,2522 ----
  /* find the band in a region with the most rectangles */
  static int
! pixman_region16_find_max_band(pixman_region16_t * prgn)
  {
      int nbox;

Index: pixregionint.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/pixregionint.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/pixregionint.h	10 Dec 2003 23:24:33 -0000	1.6
--- b/pixregionint.h	16 Apr 2004 15:32:53 -0000	1.7
***************
*** 52,70 ****
  #include "pixman.h"
  
! typedef struct _pixman_region16_tData {
      long		size;
      long		numRects;
      /* XXX: And why, exactly, do we have this bogus struct definition? */
  /*  pixman_box16_t	rects[size];   in memory but not explicitly declared */
! } pixman_region16_tData;
  
! struct _pixman_region16_t {
      pixman_box16_t	extents;
!     pixman_region16_tData	*data;
  };
  
! typedef struct _pixman_region16_tPoint {
      int x, y;
! } pixman_region16_tPoint;
  
  #define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
--- 52,70 ----
  #include "pixman.h"
  
! typedef struct pixman_region16_data {
      long		size;
      long		numRects;
      /* XXX: And why, exactly, do we have this bogus struct definition? */
  /*  pixman_box16_t	rects[size];   in memory but not explicitly declared */
! } pixman_region16_data_t;
  
! struct pixman_region16 {
      pixman_box16_t	extents;
!     pixman_region16_data_t	*data;
  };
  
! typedef struct pixman_region16_point {
      int x, y;
! } pixman_region16_point_t;
  
  #define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
***************
*** 79,83 ****
  #define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->numRects)
  #define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1)
! #define PIXREGION_SZOF(n) (sizeof(pixman_region16_tData) + ((n) * sizeof(pixman_box16_t)))
  
  #endif /* _PIXREGIONINT_H_ */
--- 79,83 ----
  #define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->numRects)
  #define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1)
! #define PIXREGION_SZOF(n) (sizeof(pixman_region16_data_t) + ((n) * sizeof(pixman_box16_t)))
  
  #endif /* _PIXREGIONINT_H_ */





More information about the cairo-commit mailing list