This is the suggested size in bytes of buffers allocated on the stack per
function, mostly used for glyph rendering. We typically use a local buffer on
the stack to avoid mallocing for small requests. Requests that do not fit are
malloc()ed automatically. The default value should be enough for about a
100-glyph cairo_show_glyphs() operation.
The rule is: cairo_glyph_t* is always passed as const for measurement
purposes. This was not reflected in our public api previously. Fixed
Showing glyphs used to have cairo_glyph_t* always as const. With this
changed, it is only const on cairo_t and cairo_gstate_t operations.
cairo_surface_t, cairo_scaled_font_t, and individual backends receive
cairo_glyph_t* as non-const. The desired semantics is that they may modify
the contents of the array as long as they do not return
CAIRO_STATUS_UNSUPPORTED. This makes it possible to avoid copying the glyph
array again and again, and edit it in-place. Backends are in fact free to use
the array as a generic buffer as they see fit.
A nice side effect of this new approach is that the valid input range
was expanded back to (INT_MIN, INT_MAX]. No performance regressions observed.
Also included is documentation about the internal mysteries of _cairo_lround,
as previously promised.
Pass cairo_ft_options_t around by pointer, not by value. That's what we do
with cairo_font_options_t anyway, and there is no reason to not do the same
here. (makes -Waggregate-return warnings go away btw).
Move the list of private headers into separate file Headers.mk that
Makefile.am includes (using automake). To update the list, just remove
Headers.mk and make.
The purpose of this test case is to help make
sure that changes to the trapezoid generation or
intersection computation in the tessellator
don't break it.
Some systems cannot handle very long list of arguments. Carl was hitting this
for "make clean". Break it out into several rm calls triggered by the
clean-local target.
This patch removes the guard bits from the tessellator internal
coordinates and reworks the input validation to make sure that the
tessellator code should never die on an assert. When the extent of a
polygon exceeds a width or height of 2^31-1, then the rightmost
(resp. bottommost) points are clamped to within 2^31-1 of the leftmost
(resp. topmost) point of the polygon. The clamping produces bad
rendering for really large polygons, and needs to be fixed in a saner
manner.
Cleaned up as per
http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
This patch improves the translation invariance of the tessellator
by offsetting all input coordinates to be nonnegative and paves
the way for future optimisations using the coordinate range.
Also changes the assertions to make sure that it is safe to add
the guard bits. This needs to be changed to do something sensible
about input coordinates that are too large instead of croaking.
The plan is to steal the guard bits from the least significant
instead of the most significant user bits, and having all coordinates
nonnegative will make the rounding involved there easier.
The cairo_in_fill() function sometimes gives false positives
when it samples a point on the edge of an empty trapezoid.
This patch alleviates the bug (but doesn't fix it completely),
for the common(?) case where the left and right edges of the
empty trapezoid have equal top and bottom points.
Fixes the regression exhibited by the test fill-missed-stop,
where the tessellator would sometimes extend a trapezoid
too far below the end of the right edge.
Fixes the regression fill-degenerate-sort-order, where
confusion arises in the event order for collinear edges.
Also fixes (or at least hides) the issues with zrusin-another
sometimes generating different trapezoids depending on the
state of the random number generator in cairo-skiplist.c.
The new tessellator contains a regression where stop events
that aren't followed by start events sometimes cause the
trapezoid to the left of an edge to be too high.
There's currently a regression bug in the tessellation code from
switching to the new tessellator. The bug is caused by
confusion in the comparator used to order events when there are
degenerate edges. This test is derived from the zrusin-another
performance test case.
Thanks to Mathieu Lacage for the recommendation of:
"Computational Geometry, Algorithms and Applications", M. de
Berg, M. van Kreveld, M. Overmars, M. Schwarzkopf