Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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.
|
|
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.
|
|
Blitz all allocations to ensure that they raise a
_cairo_error(CAIRO_STATUS_NO_MEMORY) on failure.
|
|
Perform similar sanity checks to Vlad's _cairo_malloc_ab() but on the
arguments to realloc instead.
|
|
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.
|
|
Yet another victim in my hunt against abbreviations within cairo's implementation.
|
|
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.
|
|
|
|
|
|
|
|
Most of the splines need not more than eight points. This avoids
calling malloc() for those cases, and eight-points take only 64 bytes.
|
|
|
|
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.
|
|
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/^[ \t]+$//'
run on all *.[ch] files within cairo.
|
|
Standardize brace handling around all else clauses according to new CODING_STYLE guidelines.
|
|
address.
|
|
Resize arrays by doubling rather than by linear increments.
Add new bug exposed centi_unfinished.svg.
|
|
|
|
|
|
Library Public License version 2 or 'any later version'
|
|
|
|
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)).
|
|
|
|
cairo_set_target_surface, and cairo_set_target_image to act appropriately in the face of non-zero status.
|
|
some point.
|
|
extension. This is still horribly slow. Removed many uses of X-specific macros, (eg. XDoubleToFixed)
|
|
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.
|
|
|
|
|