[cairo-commit] libpixman/src icrect.c,1.7,1.8

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


Committed by: dajobe

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

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


Index: icrect.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icrect.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** icrect.c	29 Oct 2003 18:45:02 -0000	1.7
--- icrect.c	10 Dec 2003 22:21:10 -0000	1.8
***************
*** 25,33 ****
  /* XXX: I haven't ported this yet
  static void
! IcColorRects (IcImage	 *dst,
! 	      IcImage	 *clipPict,
! 	      IcColor	 *color,
  	      int	 nRect,
! 	      IcRectangle *rects,
  	      int	 xoff,
  	      int	 yoff)
--- 25,33 ----
  /* XXX: I haven't ported this yet
  static void
! pixman_color_tRects (pixman_image_t	 *dst,
! 	      pixman_image_t	 *clipPict,
! 	      pixman_color_t	 *color,
  	      int	 nRect,
! 	      pixman_rectangle_t *rects,
  	      int	 xoff,
  	      int	 yoff)
***************
*** 46,51 ****
  	mask |= CPClipXOrigin|CPClipYOrigin;
  	
! 	clip = PixRegionCreate ();
! 	PixRegionCopy (clip, pClipPict->clientClip);
  	(*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
      }
--- 46,51 ----
  	mask |= CPClipXOrigin|CPClipYOrigin;
  	
! 	clip = pixman_region_create ();
! 	pixman_region_copy (clip, pClipPict->clientClip);
  	(*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
      }
***************
*** 73,79 ****
  */
  
! void IcFillRectangle (IcOperator	op,
! 		      IcImage		*dst,
! 		      const IcColor	*color,
  		      int		x,
  		      int		y,
--- 73,79 ----
  */
  
! void pixman_fill_rectangle (pixman_operator_t	op,
! 		      pixman_image_t		*dst,
! 		      const pixman_color_t	*color,
  		      int		x,
  		      int		y,
***************
*** 81,85 ****
  		      unsigned int	height)
  {
!     IcRectangle rect;
  
      rect.x = x;
--- 81,85 ----
  		      unsigned int	height)
  {
!     pixman_rectangle_t rect;
  
      rect.x = x;
***************
*** 88,117 ****
      rect.height = height;
  
!     IcFillRectangles (op, dst, color, &rect, 1);
  }
  
  void
! IcFillRectangles (IcOperator		op,
! 		  IcImage		*dst,
! 		  const IcColor		*color,
! 		  const IcRectangle	*rects,
  		  int			nRects)
  {
!     IcColor color_s = *color;
  
      if (color_s.alpha == 0xffff)
      {
! 	if (op == IcOperatorOver)
! 	    op = IcOperatorSrc;
      }
!     if (op == IcOperatorClear)
  	color_s.red = color_s.green = color_s.blue = color_s.alpha = 0;
  
  /* XXX: Really need this to optimize solid rectangles
!     if (op == IcOperatorSource || op == IcOperatorClear)
      {
! 	IcColorRects (dst, dst, &color_s, nRects, rects, 0, 0);
  	if (dst->alphaMap)
! 	    IcColorRects (dst->alphaMap, dst,
  			  &color_s, nRects, rects,
  			  dst->alphaOrigin.x,
--- 88,117 ----
      rect.height = height;
  
!     pixman_fill_rectangles (op, dst, color, &rect, 1);
  }
  
  void
! pixman_fill_rectangles (pixman_operator_t		op,
! 		  pixman_image_t		*dst,
! 		  const pixman_color_t		*color,
! 		  const pixman_rectangle_t	*rects,
  		  int			nRects)
  {
!     pixman_color_t color_s = *color;
  
      if (color_s.alpha == 0xffff)
      {
! 	if (op == PIXMAN_OPERATOR_OVER)
! 	    op = PIXMAN_OPERATOR_SRC;
      }
!     if (op == PIXMAN_OPERATOR_CLEAR)
  	color_s.red = color_s.green = color_s.blue = color_s.alpha = 0;
  
  /* 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,
***************
*** 121,130 ****
  */
      {
! 	IcFormat	rgbaFormat;
  	IcPixels	*pixels;
! 	IcImage		*src;
! 	IcBits		pixel;
  
! 	IcFormatInit (&rgbaFormat, PICT_a8r8g8b8);
  	
  	pixels = IcPixelsCreate (1, 1, rgbaFormat.depth);
--- 121,130 ----
  */
      {
! 	pixman_format_t	rgbaFormat;
  	IcPixels	*pixels;
! 	pixman_image_t		*src;
! 	pixman_bits_t		pixel;
  
! 	pixman_format_tInit (&rgbaFormat, PICT_a8r8g8b8);
  	
  	pixels = IcPixelsCreate (1, 1, rgbaFormat.depth);
***************
*** 132,136 ****
  	    goto bail1;
  	
! 	IcColorToPixel (&rgbaFormat, &color_s, &pixel);
  
  	/* XXX: Originally, fb had the following:
--- 132,136 ----
  	    goto bail1;
  	
! 	pixman_color_tToPixel (&rgbaFormat, &color_s, &pixel);
  
  	/* XXX: Originally, fb had the following:
***************
*** 143,155 ****
  	pixels->data[0] = pixel;
  
! 	src = IcImageCreateForPixels (pixels, &rgbaFormat);
  	if (!src)
  	    goto bail2;
  
! 	IcImageSetRepeat (src, 1);
  
  	while (nRects--)
  	{
! 	    IcComposite (op, src, 0, dst, 0, 0, 0, 0, 
  			 rects->x,
  			 rects->y,
--- 143,155 ----
  	pixels->data[0] = pixel;
  
! 	src = pixman_image_tCreateForPixels (pixels, &rgbaFormat);
  	if (!src)
  	    goto bail2;
  
! 	pixman_image_tSetRepeat (src, 1);
  
  	while (nRects--)
  	{
! 	    pixman_composite (op, src, 0, dst, 0, 0, 0, 0, 
  			 rects->x,
  			 rects->y,
***************
*** 159,163 ****
  	}
  
! 	IcImageDestroy (src);
  bail2:
  	IcPixelsDestroy (pixels);
--- 159,163 ----
  	}
  
! 	pixman_image_tDestroy (src);
  bail2:
  	IcPixelsDestroy (pixels);
***************
*** 166,168 ****
      }
  }
! slim_hidden_def(IcFillRectangles);
--- 166,168 ----
      }
  }
! slim_hidden_def(pixman_fill_rectangles);





More information about the cairo-commit mailing list