[cairo-commit] cairo/src cairo_polygon.c, 1.10, 1.11 cairo_spline.c, 1.12, 1.13 cairo_traps.c, 1.19, 1.20

Carl Worth commit at pdx.freedesktop.org
Thu Dec 23 13:49:59 PST 2004


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv22625/src

Modified Files:
	cairo_polygon.c cairo_spline.c cairo_traps.c 
Log Message:

        * src/cairo_traps.c: Remove unused CAIRO_TRAPS_GROWTH_INC.

        * src/cairo_spline.c (_cairo_spline_add_point):
        * src/cairo_polygon.c (_cairo_polygon_add_edge): Resize arrays by
        doubling rather than by linear increments.

        * BUGS: Add new bug exposed centi_unfinished.svg.


Index: cairo_polygon.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_polygon.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cairo_polygon.c	22 Oct 2004 01:40:50 -0000	1.10
+++ cairo_polygon.c	23 Dec 2004 21:49:57 -0000	1.11
@@ -37,8 +37,6 @@
 #include <stdlib.h>
 #include "cairoint.h"
 
-#define CAIRO_POLYGON_GROWTH_INC 10
-
 /* private functions */
 
 static cairo_status_t
@@ -104,7 +102,8 @@
     }
 
     if (polygon->num_edges >= polygon->edges_size) {
-	status = _cairo_polygon_grow_by (polygon, CAIRO_POLYGON_GROWTH_INC);
+	int additional = polygon->edges_size ? polygon->edges_size : 16;
+	status = _cairo_polygon_grow_by (polygon, additional);
 	if (status) {
 	    return status;
 	}

Index: cairo_spline.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_spline.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo_spline.c	22 Oct 2004 01:40:50 -0000	1.12
+++ cairo_spline.c	23 Dec 2004 21:49:57 -0000	1.13
@@ -54,8 +54,6 @@
 static cairo_status_t
 _cairo_spline_decompose_into (cairo_spline_t *spline, double tolerance_squared, cairo_spline_t *result);
 
-#define CAIRO_SPLINE_GROWTH_INC 100
-
 cairo_int_status_t
 _cairo_spline_init (cairo_spline_t *spline,
 		    cairo_point_t *a, cairo_point_t *b,
@@ -136,7 +134,8 @@
     }
 
     if (spline->num_points >= spline->points_size) {
-	status = _cairo_spline_grow_by (spline, CAIRO_SPLINE_GROWTH_INC);
+	int additional = spline->points_size ? spline->points_size : 32;
+	status = _cairo_spline_grow_by (spline, additional);
 	if (status)
 	    return status;
     }

Index: cairo_traps.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_traps.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cairo_traps.c	22 Oct 2004 01:40:50 -0000	1.19
+++ cairo_traps.c	23 Dec 2004 21:49:57 -0000	1.20
@@ -37,8 +37,6 @@
 
 #include "cairoint.h"
 
-#define CAIRO_TRAPS_GROWTH_INC 10
-
 /* private functions */
 
 static cairo_status_t




More information about the cairo-commit mailing list