xserver/fb Makefile.am, 1.5, 1.6 fbedge.c, NONE, 1.1 fbedgeimp.h, NONE, 1.1 fbpict.c, 1.30, 1.31 fbpict.h, 1.17, 1.18 fbtrap.c, 1.11, 1.12

Keith Packard xserver-commit at pdx.freedesktop.org
Thu Jul 29 01:10:17 PDT 2004


Committed by: keithp

Update of /cvs/xserver/xserver/fb
In directory pdx:/tmp/cvs-serv18390/fb

Modified Files:
	Makefile.am fbpict.c fbpict.h fbtrap.c 
Added Files:
	fbedge.c fbedgeimp.h 
Log Message:
2004-07-29  Keith Packard  <keithp at keithp.com>

	* fb/Makefile.am:
	* fb/fbedge.c: (fbRasterizeEdges):
	* fb/fbedgeimp.h:
	* fb/fbpict.c: (fbPictureInit):
	* fb/fbpict.h:
	* fb/fbtrap.c: (fbAddTraps), (fbRasterizeTrapezoid), (_GreaterY),
	(_Clockwise), (fbAddTriangles):
	* include/mipict.h:
	* include/picture.h:
	* include/picturestr.h:
	* include/renderedge.h:
	* render/Makefile.am:
	* render/mipict.c: (miIsSolidAlpha), (miPictureInit):
	* render/mitrap.c: (miTrapezoids):
	* render/mitri.c: (miTriangles), (miTriStrip), (miTriFan):
	* render/picture.c: (AddTraps):
	* render/render.c: (RenderNumberRequests), (ProcRenderAddTraps),
	(SProcRenderAddTraps), (PanoramiXRenderAddTraps),
	(PanoramiXRenderInit):
	* render/renderedge.c: (RenderSampleCeilY), (RenderSampleFloorY),
	(RenderEdgeStep), (_RenderEdgeMultiInit), (RenderEdgeInit),
	(RenderLineFixedEdgeInit):
	Change polygon fill semantics to regular point sampling
	Add RenderAddTraps request


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/fb/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.am	11 Nov 2003 05:46:07 -0000	1.5
+++ Makefile.am	29 Jul 2004 08:10:15 -0000	1.6
@@ -19,6 +19,8 @@
 	fbcmap.c	\
 	fbcompose.c	\
 	fbcopy.c	\
+	fbedge.c	\
+	fbedgeimp.h	\
 	fbfill.c	\
 	fbfillrect.c	\
 	fbfillsp.c	\

--- NEW FILE: fbedge.c ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: fbedgeimp.h ---
(This appears to be a binary file; contents omitted.)

Index: fbpict.c
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbpict.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- fbpict.c	13 May 2004 21:09:30 -0000	1.30
+++ fbpict.c	29 Jul 2004 08:10:15 -0000	1.31
@@ -1726,8 +1726,8 @@
     ps->Glyphs = miGlyphs;
     ps->CompositeRects = miCompositeRects;
     ps->RasterizeTrapezoid = fbRasterizeTrapezoid;
-
-    
+    ps->AddTraps = fbAddTraps;
+    ps->AddTriangles = fbAddTriangles;
 #endif /* RENDER */
 
     return TRUE;

Index: fbpict.h
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbpict.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- fbpict.h	13 May 2004 21:09:30 -0000	1.17
+++ fbpict.h	29 Jul 2004 08:10:15 -0000	1.18
@@ -25,6 +25,8 @@
 #ifndef _FBPICT_H_
 #define _FBPICT_H_
 
+#include "renderedge.h"
+
 #define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
 #define FbIntDiv(a,b)	 (((CARD16) (a) * 255) / (b))
 
@@ -135,6 +137,15 @@
  */
 extern FbAccessMap  fbAccessMap[];
 
+/* fbaddtrap.c */
+
+void
+fbAddTraps (PicturePtr	pPicture,
+	    INT16	xOff,
+	    INT16	yOff,
+	    int		ntrap,
+	    xTrap	*traps);
+
 /* fbcompose.c */
 
 typedef struct _fbCompSrc {
@@ -753,6 +764,17 @@
 		    CARD16	height);
 
 
+/* fbedge.c */
+void
+fbRasterizeEdges (FbBits	*buf,
+		  int		bpp,
+		  int		width,
+		  int		stride,
+		  RenderEdge	*l,
+		  RenderEdge	*r,
+		  xFixed	t,
+		  xFixed	b);
+
 /* fbpict.c */
 CARD32
 fbOver (CARD32 x, CARD32 y);
@@ -1019,10 +1041,25 @@
 	     CARD16     height);
 
 /* fbtrap.c */
+
+void
+fbAddTraps (PicturePtr	pPicture,
+	    INT16	xOff,
+	    INT16	yOff,
+	    int		ntrap,
+	    xTrap	*traps);
+
 void
 fbRasterizeTrapezoid (PicturePtr    alpha,
 		      xTrapezoid    *trap,
 		      int	    x_off,
 		      int	    y_off);
 
+void
+fbAddTriangles (PicturePtr  pPicture,
+		INT16	    xOff,
+		INT16	    yOff,
+		int	    ntri,
+		xTriangle   *tris);
+
 #endif /* _FBPICT_H_ */

Index: fbtrap.c
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbtrap.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- fbtrap.c	11 Sep 2003 05:12:50 -0000	1.11
+++ fbtrap.c	29 Jul 2004 08:10:15 -0000	1.12
@@ -1,30 +1,26 @@
 /*
  * $Id$
  *
- * Copyright © 2000 University of Southern California
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of University
- * of Southern California not be used in advertising or publicity
[...1520 lines suppressed...]
-    {
-        return ((area >> bits) * ((1 << depth) - 1)) >> (31 - depth);
-    }
-
-Avoiding the branch bubble in the AREA_MULT could be done with either:
-
-area = (w * h + 1) >> 1;
-area |= ((area - 1) & 0x80000000);
-
-or
-        #define AREA_MULT(w,h) ((((w)*(h) + 1) >> 1) | ((w)&(h)&0x10000) << 15)
-
-depending on your preference, the first takes one less operation but
-can't be expressed as a macro; the second takes a large constant which may
-require an additional instruction on some processors.  The differences
-will be swamped by the cost of the multiply.
-
-*/
-
 #endif /* RENDER */



More information about the xserver-commit mailing list