[cairo-commit] libpixman/src Makefile.am, 1.7, 1.8 fbedge.c, 1.1,
1.2 fbtrap.c, 1.2, 1.3 icint.h, 1.24, 1.25 ictransform.c, 1.6,
1.7 ictrap.c, 1.15, 1.16 ictri.c, 1.11, 1.12 renderedge.c, 1.1,
1.2 renderedge.h, 1.1, 1.2
Carl Worth
commit at pdx.freedesktop.org
Fri Jan 21 10:26:30 PST 2005
Committed by: cworth
Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv20424/src
Modified Files:
Makefile.am fbedge.c fbtrap.c icint.h ictransform.c ictrap.c
ictri.c renderedge.c renderedge.h
Log Message:
* src/ictri.c (IcRasterizeTriangle):
* src/ictrap.c (pixman_composite_trapezoids): Switch to use new
fbRasterizeTrapezoid. Gut old IcRasterizeTrapezoid
implementation. Remove lots of code, (and all the bugs with it).
* src/icint.h: Replace IcRasterizeTrapezoid with
fbRasterizeTrapezoid. Add a couple of missing typedefs.
* src/renderedge.h:
* src/renderedge.c (RenderLineFixedEdgeInit):
* src/fbtrap.c:
* src/fbedge.c: Minor changes to allow things to compile within
libpixman tree, (replace xserver include directives with
pixman-xserver-compat.h and sprinkle a few const qualifiers).
* src/Makefile.am (libpixman_la_SOURCES): Add sources for new
point-sampling rasterization.
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/libpixman/src/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.am 23 Dec 2004 19:10:08 -0000 1.7
+++ Makefile.am 21 Jan 2005 18:26:28 -0000 1.8
@@ -22,6 +22,10 @@
ictransform.c \
ictri.c \
icutil.c \
+ fbedge.c \
+ fbtrap.c \
+ renderedge.c \
+ renderedge.h \
slim_internal.h
libpixman_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
Index: fbedge.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/fbedge.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fbedge.c 18 Jan 2005 19:54:23 -0000 1.1
+++ fbedge.c 21 Jan 2005 18:26:28 -0000 1.2
@@ -22,18 +22,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "fb.h"
+#include "pixman-xserver-compat.h"
#ifdef RENDER
-#include "picturestr.h"
-#include "mipict.h"
-#include "renderedge.h"
-#include "fbpict.h"
-
/*
* 8 bit alpha
*/
Index: fbtrap.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/fbtrap.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fbtrap.c 21 Jan 2005 17:26:44 -0000 1.2
+++ fbtrap.c 21 Jan 2005 18:26:28 -0000 1.3
@@ -22,18 +22,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "fb.h"
+#include "pixman-xserver-compat.h"
#ifdef RENDER
-#include "picturestr.h"
-#include "mipict.h"
-#include "renderedge.h"
-#include "fbpict.h"
-
+/* XXX: Haven't added addTraps to libpixman yet. */
+#if 0
void
fbAddTraps (PicturePtr pPicture,
INT16 x_off,
@@ -95,10 +89,11 @@
traps++;
}
}
+#endif
void
fbRasterizeTrapezoid (PicturePtr pPicture,
- xTrapezoid *trap,
+ const xTrapezoid *trap,
int x_off,
int y_off)
{
@@ -143,6 +138,8 @@
}
}
+/* XXX: Haven't add addTriangles to libpixman yet. */
+#if 0
static int
_GreaterY (xPointFixed *a, xPointFixed *b)
{
@@ -234,5 +231,6 @@
fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
}
}
+#endif
#endif /* RENDER */
Index: icint.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/icint.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- icint.h 7 Jan 2005 20:14:40 -0000 1.24
+++ icint.h 21 Jan 2005 18:26:28 -0000 1.25
@@ -754,6 +754,14 @@
pixman_private pixman_bits_t
IcReplicatePixel (Pixel p, int bpp);
+/* fbtrap.c */
+
+pixman_private void
+fbRasterizeTrapezoid (pixman_image_t *pMask,
+ const pixman_trapezoid_t *pTrap,
+ int x_off,
+ int y_off);
+
/* XXX: This is to avoid including gc.h from the server includes */
/* clientClipType field in GC */
#define CT_NONE 0
@@ -812,14 +820,6 @@
pixman_transform_point (pixman_transform_t *transform,
pixman_vector_t *vector);
-/* ictrap.c */
-
-pixman_private void
-IcRasterizeTrapezoid (pixman_image_t *pMask,
- const pixman_trapezoid_t *pTrap,
- int x_off,
- int y_off);
-
/* Avoid unnessecary PLT entries. */
slim_hidden_proto(pixman_image_create)
@@ -840,7 +840,6 @@
typedef struct _DirectFormat *DirectFormatPtr;
typedef struct _PictFormat *PictFormatPtr;
-typedef struct _Picture *PicturePtr;
/*
* While the protocol is generous in format support, the
@@ -993,6 +992,7 @@
# endif
#endif
+typedef xFixed_32_32 xFixed_48_16;
typedef uint32_t xFixed_1_31;
typedef uint32_t xFixed_1_16;
typedef int32_t xFixed_16_16;
Index: ictransform.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictransform.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ictransform.c 10 Dec 2003 23:24:00 -0000 1.6
+++ ictransform.c 21 Jan 2005 18:26:28 -0000 1.7
@@ -23,8 +23,6 @@
#include "icint.h"
-typedef xFixed_32_32 xFixed_48_16;
-
#define MAX_FIXED_48_16 ((xFixed_48_16) 0x7fffffff)
#define MIN_FIXED_48_16 (-((xFixed_48_16) 1 << 31))
Index: ictrap.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictrap.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ictrap.c 14 Jan 2005 02:08:57 -0000 1.15
+++ ictrap.c 21 Jan 2005 18:26:28 -0000 1.16
@@ -158,7 +158,7 @@
if (!image)
continue;
}
- IcRasterizeTrapezoid (image, traps,
+ fbRasterizeTrapezoid (image, traps,
-bounds.x1, -bounds.y1);
if (!format)
{
@@ -184,1338 +184,3 @@
pixman_format_destroy (format);
[...1316 lines suppressed...]
-int
-AreaAlpha (xFixed_1_31 area, int depth)
- {
- 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.
-
-*/
Index: ictri.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictri.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ictri.c 10 Dec 2003 23:40:09 -0000 1.11
+++ ictri.c 21 Jan 2005 18:26:28 -0000 1.12
@@ -129,9 +129,9 @@
trap[1].left.p2 = trap[0].right.p2;
}
if (trap[0].top != trap[0].bottom)
- IcRasterizeTrapezoid (image, &trap[0], x_off, y_off);
+ fbRasterizeTrapezoid (image, &trap[0], x_off, y_off);
if (trap[1].top != trap[1].bottom)
- IcRasterizeTrapezoid (image, &trap[1], x_off, y_off);
+ fbRasterizeTrapezoid (image, &trap[1], x_off, y_off);
}
void
Index: renderedge.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/renderedge.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- renderedge.c 18 Jan 2005 19:54:23 -0000 1.1
+++ renderedge.c 21 Jan 2005 18:26:28 -0000 1.2
@@ -22,7 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#include "renderedge.h"
+#include "pixman-xserver-compat.h"
/*
* Compute the smallest value no less than y which is on a
@@ -170,13 +170,13 @@
RenderLineFixedEdgeInit (RenderEdge *e,
int n,
xFixed y,
- xLineFixed *line,
+ const xLineFixed *line,
int x_off,
int y_off)
{
xFixed x_off_fixed = IntToxFixed(x_off);
xFixed y_off_fixed = IntToxFixed(y_off);
- xPointFixed *top, *bot;
+ const xPointFixed *top, *bot;
if (line->p1.y <= line->p2.y)
{
Index: renderedge.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/renderedge.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- renderedge.h 18 Jan 2005 19:54:23 -0000 1.1
+++ renderedge.h 21 Jan 2005 18:26:28 -0000 1.2
@@ -25,7 +25,7 @@
#ifndef _RENDEREDGE_H_
#define _RENDEREDGE_H_
-#include "picturestr.h"
+#include "pixman-xserver-compat.h"
#define MAX_ALPHA(n) ((1 << (n)) - 1)
#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
@@ -113,7 +113,7 @@
RenderLineFixedEdgeInit (RenderEdge *e,
int bpp,
xFixed y,
- xLineFixed *line,
+ const pixman_line_fixed_t *line,
int x_off,
int y_off);
More information about the cairo-commit
mailing list