Commit graph

2870 commits

Author SHA1 Message Date
Behdad Esfahbod
da60bc45f2 [cairoint] Define CAIRO_STACK_BUFFER_SIZE (defaults to 2kb)
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.
2006-12-11 03:10:05 -05:00
Behdad Esfahbod
5a9642c574 Add/remove const to cairo_glyph_t* arguments consistently
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.
2006-12-11 01:39:51 -05:00
Behdad Esfahbod
70695f5c62 [FreeType] Remove "UNSUPPORTED" show_glyphs stub and NULL its entry
The fallback paths always assume UNSUPPORTED if a method is NULL, so, no need
for a method to just return UNSUPPORTED.
2006-12-10 02:33:59 -05:00
Dan Amelang
fea60c7283 Change _cairo_lround to correctly handle edge cases previously missed
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.
2006-12-09 21:05:20 -08:00
Behdad Esfahbod
cc75159587 [FreeType] Do not return large structs from functions
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).
2006-12-08 16:10:57 -05:00
Behdad Esfahbod
beadc7da86 [docs] Update templates 2006-12-08 15:42:24 -05:00
Behdad Esfahbod
cdd79c104d [docs] Generate index of new symbols in 1.4 2006-12-08 15:41:52 -05:00
Behdad Esfahbod
16c7587f2d [slim] Define slim macros to dummy prototypes for non-gcc compilers (#9150) 2006-12-08 15:40:59 -05:00
Behdad Esfahbod
6122c30930 [pixman] Remove unused slim_internal.h 2006-12-08 15:38:34 -05:00
Behdad Esfahbod
734b321aab [doc] Minor wording improvement. 2006-12-07 00:14:37 -05:00
Behdad Esfahbod
eedd86165e [docs] Document CAIRO_VERSION_STRING. 2006-12-07 00:08:09 -05:00
Behdad Esfahbod
9b87fab8ce [docs] Hook various new API into cairo-sections.txt 2006-12-06 23:52:22 -05:00
Behdad Esfahbod
0e028ee0f3 [doc/public/Makefile.am] Move the list of private headers generatable
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.
2006-12-06 23:40:08 -05:00
Behdad Esfahbod
b8e1f3778e [docs] Document various CAIRO_VERSION_* macros 2006-12-06 23:38:20 -05:00
M Joonas Pihlaja
fd03991a6a test: random-intersections
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.
2006-12-07 04:46:07 +02:00
M Joonas Pihlaja
6301f92d2a Rework the in-fill-empty-trapezoid test to not use the cairo_test() framework.
As suggested by Behdad Esfahbod, we can not use the cairo_test() framework
when it is getting in the way.  The test itself doesn't depend on any
particular backend.

http://lists.freedesktop.org/archives/cairo/2006-December/008809.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
c13a1a2ed0 Replace point sampling in the fill-degenerate-sort-order with rendering.
Clean up the test to not even check the ps backend as per:

http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
565a715d11 Change license of tessellator tests to the MIT license.
The blurb for the fill-degenerate-sort-order, fill-missed-stop and
in-fill-empty-trapezoid tests changed to this one:

http://www.opensource.org/licenses/mit-license.php

c.f. http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
e857ac325a tessellator bug fix: linking fails on x86_64 due to superfluous inline attribute.
Remove inline attribute from cairo_bo_event_compare_abstract()
to fix the linking issue reported by Jinghua Luo on the mailing list:

http://lists.freedesktop.org/archives/cairo/2006-November/008574.html
2006-12-07 02:31:10 +02:00
Behdad Esfahbod
16c0db0d68 [test] Break the "make clean" target into serveral rm calls
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.
2006-12-06 19:03:03 -05:00
Behdad Esfahbod
3cf9947795 [.gitignore] Add big-trap 2006-12-06 19:03:02 -05:00
Peter Weilbacher
4b43a3a1c4 Add OS/2 backend and its requirement to INSTALL and README, following the example of BeOS. 2006-12-07 00:27:29 +01:00
Carl Worth
652f73f090 Bump version to 1.3.7 after making 1.3.6 snapshot 2006-12-06 13:40:52 -08:00
Carl Worth
648ef4487d Increment cairo version to 1.3.6 (and libtool versioning to 12:1:10) 2006-12-06 13:22:41 -08:00
Carl Worth
f0459b3c53 NEWS: Add notes for 1.3.6 snapshot 2006-12-06 13:20:04 -08:00
Carl Worth
e840c120dd Fix 'make distcheck' by mentioning test/pdiff in DIST_SUBDIRS 2006-12-06 13:19:30 -08:00
Carl Worth
b83f9e766a ROADMAP: Note that the Banker's rounding bug is fixed 2006-12-06 13:17:41 -08:00
Dan Amelang
ce58f874fe Change _cairo_lround to use arithmetic rounding
This fixes the text rendering bug reported here:

    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217819

No performance impact on x86. On the 770, I see minor speedups in text_solid
and text_image (~1.05x).
2006-12-06 12:30:28 -08:00
M Joonas Pihlaja
d0eff39196 tessellator: input validation and guard bit removal
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
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
f8ba749172 tessellator: offset working coordinates to be nonnegative
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.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
633c51b442 tessellator bug fix: in-fill-empty-trapezoid
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.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
e6c8febca7 tessellator bug fix: fill-missed-stop
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.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
614117e487 tessellator bug fix: fill-degenerate-sort-order
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.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
48b42efcfe test: check for tessellator regression from missed stop events
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.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
e94e0a1ca2 test: check if cairo_in_fill() is reporting false positives for empty trapezoids.
cairo_in_fill() may report true if a query point lands on an edge of an
empty trapezoid.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
00d7b6acdd test: tessellator event comparator test case for degenerate edges.
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.
2006-12-06 05:58:44 +02:00
Carl Worth
c92f23caa5 ROADMAP: Add _cairo_lround bug for 1.3.6. Note some completed items for 1.4.0 2006-12-05 11:14:49 -08:00
M Joonas Pihlaja
4057a98f88 cairo-perf-diff-files: Don't segfault reading cooked perf reports.
Fixes cairo-perf-diff-files for non-raw cairo-perf reports.  Similar
to the patch on the mailing list, only applied to the caller of
_cairo_stats_compute():

http://lists.freedesktop.org/archives/cairo/2006-December/008720.html
2006-12-05 06:02:45 +02:00
Mathieu Lacage
a4f5463cdd bugfix: fix cairo-wideint.c uint64_t usage and const return qualifiers
These patches were sent to the cairo mailing list by Mathieu Lacage
<Mathieu.Lacage@sophia.inria.fr>:

http://lists.freedesktop.org/archives/cairo/2006-December/008741.html

  _cairo_uint_96by64_32x64_divrem(): fixes misuse of the uint64_t type
  and cairo-wideint-private.h functions.

http://lists.freedesktop.org/archives/cairo/2006-December/008742.html

  Remove const qualifiers from return types from cairo-wideint.c functions.

http://lists.freedesktop.org/archives/cairo/2006-December/008747.html

  Fixes a typo in cairo-wideint-private.h: _cairo_uint128_to_int128_
  had an extra trailing underscore.
2006-12-05 03:59:11 +02:00
Dan Amelang
94e086b7b9 [configure] Fix --disable-some-floating-point to force value to 'no' if none given
As suggested by Behdad here:

    http://lists.freedesktop.org/archives/cairo/2006-December/008700.html
2006-12-02 11:24:35 -08:00
Dan Amelang
392f27bf2b [configure] Add -a option to grep calls in AX_C_FLOAT_WORDS_BIGENDIAN
This fixes bug #9124 reported here:

    https://bugs.freedesktop.org/show_bug.cgi?id=9124
2006-12-02 11:08:48 -08:00
Dan Amelang
3dbe468fd6 [perf] Provide watered-down implementations of getline and strndup for
building on non-GNU toolchains.
2006-12-01 14:12:16 -08:00
Dan Amelang
d5fcbfc29f Purge cairo-test of all calls to round()
Although round() is in the C99 standard, it isn't available in all
toolchains on which cairo is compiled (VC++, for example).
2006-12-01 12:46:55 -08:00
Dan Amelang
cb9a3c2640 Add configure option --disable-some-floating-point
See discussion here: http://lists.freedesktop.org/archives/cairo/2006-November/008602.html
2006-12-01 12:41:55 -08:00
Carl Worth
7fb4e97873 BIBLIOGRAPHY: Add Joseph O'Rourke's book as recommended by Rafael Villar Burke 2006-11-30 09:15:00 -08:00
Carl Worth
7fbe594d3d Add a textbook recommendation to the bibliography
Thanks to Mathieu Lacage for the recommendation of:

	"Computational Geometry, Algorithms and Applications", M. de
	Berg, M. van Kreveld, M. Overmars, M. Schwarzkopf
2006-11-30 08:43:27 -08:00
Carl Worth
170d35b034 pdiff: Add missing newlins at end of files. 2006-11-29 23:01:30 -08:00
Carl Worth
c863315285 Hook up Makefiles for perceptualdiff. 2006-11-29 22:55:37 -08:00
Carl Worth
6e06b68452 Remove all libtiff-related code by #ifdef 2006-11-29 22:55:31 -08:00
Carl Worth
2b92556abe Use uint32_t instead of the non-standard uint32 2006-11-29 22:55:00 -08:00