Remove unused CAIRO_TRAPS_GROWTH_INC.

Resize arrays by doubling rather than by linear increments.
Add new bug exposed centi_unfinished.svg.
This commit is contained in:
Carl Worth 2004-12-23 13:49:56 +00:00
parent f76d898cf1
commit 7a5a3cb208
9 changed files with 27 additions and 16 deletions

7
BUGS
View file

@ -1,3 +1,10 @@
--
centi_unfinished.svg has big black portions when drawn with svg2png,
(but not when drawn with xsvg).
--
The caches need to be invalidated at font destruction time.
--

View file

@ -1,3 +1,13 @@
2004-12-23 Carl Worth <cworth@cworth.org>
* 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.
2004-12-21 Carl Worth <cworth@cworth.org>
* src/cairoint.h:

2
TODO
View file

@ -74,6 +74,8 @@ functions:
* Verification, profiling, optimization.
centi_unfinished.svg may provide a good test case.
A comparison with PostScript
============================

View file

@ -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 @@ _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_poin
}
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;
}

View file

@ -54,8 +54,6 @@ _cairo_spline_error_squared (cairo_spline_t *spline);
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 @@ _cairo_spline_add_point (cairo_spline_t *spline, cairo_point_t *point)
}
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;
}

View file

@ -37,8 +37,6 @@
#include "cairoint.h"
#define CAIRO_TRAPS_GROWTH_INC 10
/* private functions */
static cairo_status_t

View file

@ -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 @@ _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_poin
}
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;
}

View file

@ -54,8 +54,6 @@ _cairo_spline_error_squared (cairo_spline_t *spline);
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 @@ _cairo_spline_add_point (cairo_spline_t *spline, cairo_point_t *point)
}
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;
}

View file

@ -37,8 +37,6 @@
#include "cairoint.h"
#define CAIRO_TRAPS_GROWTH_INC 10
/* private functions */
static cairo_status_t