[cairo-commit] libpixman/src icformat.c,1.6,1.7

Dave Beckett commit at pdx.freedesktop.org
Wed Dec 10 14:20:39 PST 2003


Committed by: dajobe

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

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


Index: icformat.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icformat.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** icformat.c	10 Sep 2003 00:36:25 -0000	1.6
--- icformat.c	10 Dec 2003 22:20:37 -0000	1.7
***************
*** 26,50 ****
  #define Mask(n)	((n) == 32 ? 0xffffffff : ((1 << (n))-1))
  
! IcFormat *
! IcFormatCreate (IcFormatName name)
  {
      switch (name) {
!     case IcFormatNameARGB32:
! 	return IcFormatCreateMasks (32,
  				    0xff000000,
  				    0x00ff0000,
  				    0x0000ff00,
  				    0x000000ff);
!     case IcFormatNameRGB24:
! 	return IcFormatCreateMasks (32,
  				    0x0,
  				    0xff0000,
  				    0x00ff00,
  				    0x0000ff);
!     case IcFormatNameA8:
! 	return IcFormatCreateMasks (8, 0xff,
  				    0, 0, 0);
!     case IcFormatNameA1:
! 	return IcFormatCreateMasks (1, 0x1,
  				    0, 0, 0);
      }
--- 26,50 ----
  #define Mask(n)	((n) == 32 ? 0xffffffff : ((1 << (n))-1))
  
! pixman_format_t *
! pixman_format_tCreate (pixman_format_tName name)
  {
      switch (name) {
!     case PIXMAN_FORMAT_NAME_AR_GB32:
! 	return pixman_format_tCreateMasks (32,
  				    0xff000000,
  				    0x00ff0000,
  				    0x0000ff00,
  				    0x000000ff);
!     case PIXMAN_FORMAT_NAME_RG_B24:
! 	return pixman_format_tCreateMasks (32,
  				    0x0,
  				    0xff0000,
  				    0x00ff00,
  				    0x0000ff);
!     case PIXMAN_FORMAT_NAME_A8:
! 	return pixman_format_tCreateMasks (8, 0xff,
  				    0, 0, 0);
!     case PIXMAN_FORMAT_NAME_A1:
! 	return pixman_format_tCreateMasks (1, 0x1,
  				    0, 0, 0);
      }
***************
*** 54,63 ****
  
  /* XXX: There's some nonsense going on here. The macros above help
!    IcFormatCreateMasks to encode a format into an int, while
!    immediately afterwards IcFormatInit goes through the effort of
     decoding it. This should all be disentagled, (it's probably
     possible to just eliminate the encoding macros altogether). */
! IcFormat *
! IcFormatCreateMasks (int bpp,
  		     int alpha_mask,
  		     int red_mask,
--- 54,63 ----
  
  /* XXX: There's some nonsense going on here. The macros above help
!    pixman_format_tCreateMasks to encode a format into an int, while
!    immediately afterwards pixman_format_tInit goes through the effort of
     decoding it. This should all be disentagled, (it's probably
     possible to just eliminate the encoding macros altogether). */
! pixman_format_t *
! pixman_format_tCreateMasks (int bpp,
  		     int alpha_mask,
  		     int red_mask,
***************
*** 67,71 ****
      int type;
      int format_code;
!     IcFormat *format;
  
      if (red_mask == 0 && green_mask == 0 && blue_mask == 0)
--- 67,71 ----
      int type;
      int format_code;
!     pixman_format_t *format;
  
      if (red_mask == 0 && green_mask == 0 && blue_mask == 0)
***************
*** 82,90 ****
  			       _IcOnes (blue_mask));
  
!     format = malloc (sizeof (IcFormat));
      if (format == NULL)
  	return NULL;
  
!     IcFormatInit (format, format_code);
  
      return format;
--- 82,90 ----
  			       _IcOnes (blue_mask));
  
!     format = malloc (sizeof (pixman_format_t));
      if (format == NULL)
  	return NULL;
  
!     pixman_format_tInit (format, format_code);
  
      return format;
***************
*** 92,96 ****
  
  void
! IcFormatInit (IcFormat *format, int format_code)
  {
  /* XXX: What do we want to lodge in here?
--- 92,96 ----
  
  void
! pixman_format_tInit (pixman_format_t *format, int format_code)
  {
  /* XXX: What do we want to lodge in here?
***************
*** 148,155 ****
      }
  }
! slim_hidden_def(IcFormatInit);
  
  void
! IcFormatDestroy (IcFormat *format)
  {
      free (format);
--- 148,155 ----
      }
  }
! slim_hidden_def(pixman_format_tInit);
  
  void
! pixman_format_tDestroy (pixman_format_t *format)
  {
      free (format);





More information about the cairo-commit mailing list