summaryrefslogtreecommitdiff
path: root/src/cairo-spline.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-01[cairo-spline] Eliminate redundant _cairo_fixed_to_double().Chris Wilson1-55/+52
Inline and unroll PointDistanceSquaredToSegment() and eliminate the multiple conversions between fixed point and doubles. This simple transformation both shrinks the code and wins a few percent in path intensive benchmarks such as fuckhergently.swf
2007-11-01[cairo-spline] Reduce stack requirements during recursive refinement.Chris Wilson1-47/+47
By splitting out the knot vectors into a smaller, separate structure, we can dramatically reduce the stack allocation for each level of recursion. Secondly we can have the storage requirements by modifying the first set of knots in-place, thus we need only allocate stack space for the knots covering the deferred half of the spline.
2007-10-04[cairo-error] Clean up all the warnings and missing _cairo_error() calls.Chris Wilson1-4/+2
Every time we assign or return a hard-coded error status wrap that value with a call to _cairo_error(). So the idiom becomes: status = _cairo_error (CAIRO_STATUS_NO_MEMORY); or return _cairo_error (CAIRO_STATUS_INVALID_DASH); This ensures that a breakpoint placed on _cairo_error() will trigger immediately cairo detects the error.
2007-10-04[malloc/error] Add call to _cairo_error() after a failed malloc.Chris Wilson1-0/+1
Blitz all allocations to ensure that they raise a _cairo_error(CAIRO_STATUS_NO_MEMORY) on failure.
2007-10-04[malloc] Check for integer overflow when realloc'ing.Chris Wilson1-1/+2
Perform similar sanity checks to Vlad's _cairo_malloc_ab() but on the arguments to realloc instead.
2007-06-29[fix] Avoid int overflow when allocating large buffersVladimir Vukicevic1-1/+1
This patch introduces three macros: _cairo_malloc_ab, _cairo_malloc_abc, _cairo_malloc_ab_plus_c and replaces various calls to malloc(a*b), malloc(a*b*c), and malloc(a*b+c) with them. The macros return NULL if int overflow would occur during the allocation. See CODING_STYLE for more information.
2007-04-10Rename ARRAY_LEN to ARRAY_LENGTHCarl Worth1-2/+2
Yet another victim in my hunt against abbreviations within cairo's implementation.
2007-04-09Initialise cairo_spline_t to use its embedded buffer.Chris Wilson1-17/+7
Currently the code defaults to setting its points to NULL and fixing it up on the first add_point() to use the embedded buffer. Skip this extra step by initialising points to the embedded buffer.
2007-03-20Define and use ARRAY_LENBehdad Esfahbod1-1/+1
2007-03-13[polygon,spline,traps] Avoid free(NULL)Behdad Esfahbod1-1/+1
2007-03-13[cairo-spline] Fix typo in commentBehdad Esfahbod1-1/+1
2007-03-13[cairo-spline] Add a cache of eight points to cairo_spline_tBehdad Esfahbod1-5/+23
Most of the splines need not more than eight points. This avoids calling malloc() for those cases, and eight-points take only 64 bytes.
2007-03-13[cairo-spline] Clean-up realloc algorithm for clarityBehdad Esfahbod1-10/+7
2006-06-06Remove initial, final, and duplicate blank lines.Carl Worth1-1/+0
This patch was produced by running git-stripspace on all *.[ch] files within cairo. Note that this script would have also created all the changes from the previous commits to remove trailing whitespace.
2006-06-06Remove extraneous whitespace from "blank" lines.Carl Worth1-1/+1
This patch was produced with the following (GNU) sed script: sed -i -r -e 's/^[ \t]+$//' run on all *.[ch] files within cairo.
2005-06-03Add CODING_STYLE document to standardize on some style issues.Carl Worth1-9/+7
Standardize brace handling around all else clauses according to new CODING_STYLE guidelines.
2005-02-22Switch from broken cworth@isi.edu address to canonical cworth@cworth.org ↵Carl Worth1-1/+1
address.
2004-12-23Remove unused CAIRO_TRAPS_GROWTH_INC.Carl Worth1-3/+2
Resize arrays by doubling rather than by linear increments. Add new bug exposed centi_unfinished.svg.
2004-10-21Convert all files to utf-8. Add copyright information to cairo_png_surface.c.Carl Worth1-1/+1
2004-09-04Add the MPL as a new license option, in addition to the LGPL.Carl Worth1-10/+27
2004-08-02Fix to explicitly refer to GNU Lesser Public License 2.1 rather than the ↵Carl Worth1-7/+5
Library Public License version 2 or 'any later version'
2004-08-02Change from MIT license to LGPL.Carl Worth1-20/+14
2004-05-07Bail on NULL utf8 string.Carl Worth1-0/+7
Don't add two consecutive, identical points when decomposing the spline, (which was leading to an infinte loop in the stroke algorithm when it found a slope of (0,0)).
2003-10-23Fixed copyright attribution to refer to "University of Southern CaliforniaCarl Worth1-1/+1
2003-10-04Remove abbreviation of "point" as "pt". Fix cairo_destrot, ↵Carl Worth1-22/+22
cairo_set_target_surface, and cairo_set_target_image to act appropriately in the face of non-zero status.
2003-09-27Fixed some internal enums that had been mistakenly converted to lowercase at ↵Carl Worth1-1/+1
some point.
2003-09-05Preliminary support for running Cairo with X servers without the Render ↵Carl Worth1-6/+6
extension. This is still horribly slow. Removed many uses of X-specific macros, (eg. XDoubleToFixed)
2003-07-30Made all changes necessary to abandon the Xc library, (sucking the ↵Carl Worth1-19/+21
functionality up into cairo_surface_t instead). Eliminated most of the remaining X datatypes (XFixed, XPointFixed, XLineFixed, XTrapezoid). Fixed some numerical problems relating to pen initialization and intersection calculation.
2003-07-18Fixed some inconsistent tag/typedef names I missed the first time.Carl Worth1-1/+1
2003-07-18Renamed everything from Xr* to cairo_*Carl Worth1-0/+271