Commit graph

2815 commits

Author SHA1 Message Date
Carl Worth
9c3b161c70 Bump version to 1.3.5 after making 1.3.4 snapshot 2006-11-22 19:31:56 -08:00
Carl Worth
143c56cb12 Increment cairo version to 1.3.4 2006-11-22 19:15:31 -08:00
Carl Worth
e9dd52a337 NEWS: Add notes for 1.3.4 snapshot 2006-11-22 19:15:00 -08:00
Carl Worth
3329abba39 Add Daniel Amelang and Joonas Pihlaja to the AUTHORS file 2006-11-22 19:11:51 -08:00
Carl Worth
a8f6d27fba Add some missing cairo_private decorators 2006-11-22 18:44:34 -08:00
Joonas Pihlaja
fac3684e68 perf: new-tessellator: Deferred trapezoid generation (first try) 2006-11-22 17:55:54 -08:00
Joonas Pihlaja
6bd72ce74a Sort pointers instead of cairo_bo_events in the tessellator.
We were spending a lot of time in memcpy.
2006-11-22 17:55:54 -08:00
Joonas Pihlaja
b177573b72 Make the skip list check for uniqueness.
This patch removes a redundant call to skip_list_find()
that was being used to detect duplicate intersection events.
Instead, skip_list_insert() now takes an additional parameter
letting it know what to do with duplicates.
2006-11-22 17:55:54 -08:00
Joonas Pihlaja
8bec0bac56 Malloc less using a free list of nodes. 2006-11-22 17:55:54 -08:00
Joonas Pihlaja
de0e327b3d Tweak comparators. 2006-11-22 17:55:54 -08:00
Joonas Pihlaja
67359d7a58 Separate start and stop events from intersections (first try.)
Don't use the skip list for start and stop events, but presort
those first.
2006-11-22 17:55:54 -08:00
Joonas Pihlaja
97f02dca5d Avoid a skip-list lookup when deactivating edges. 2006-11-22 17:55:54 -08:00
Joonas Pihlaja
99f8a5313d Special cases for skip list comparators. 2006-11-22 17:55:54 -08:00
Joonas Pihlaja
fd8cd39cda Use an LFSR instead of random(). 2006-11-22 17:55:53 -08:00
Joonas Pihlaja
d957e59744 Replace the 128 bit divrem by a 96/64 bit one. 2006-11-22 17:55:53 -08:00
Joonas Pihlaja
1da14262ea A 96 by 64 bit divrem that produces a 32 bit quotient and 64 bit remainder. 2006-11-22 17:55:53 -08:00
Carl Worth
762bd1330d Make event_queue_insert ignore duplicate intersection events (not duplicate start/stop events)
This fixes the failures of the new tessellator with the 3 tests:
bitmap-font, rectangle-rounding-error, and close-path
The problem was that identical edges from separate polygons
were not being added to the event queue, (because of a check
that was actually only intended to prevent an intersection
event from being scheduled multiple times).
2006-11-22 16:56:51 -08:00
Carl Worth
4cd871b6f3 Switch from old tessellator to new tessellator 2006-11-22 16:56:51 -08:00
Carl Worth
0f7c488906 Adapt new tessellator to match the interface provided by the old tessellator. 2006-11-22 16:56:51 -08:00
Carl Worth
8921f73399 Add new tessellator (unused) in cairo-bentley-ottmann.c
This is the implementation as it cooked in the new-tessellator branch
available from:

	git://people.freedesktop.org/~cworth/cairo

The file here comes from commit eee4faf79900be2c5fda1fddd49737681a9e37d6 in
that branch. It's sitting here not hooked up to anything in cairo yet,
and still with a main function with test cases, etc.
2006-11-22 16:56:51 -08:00
Carl Worth
c2509f8a72 Add skip list implementation (many thanks to Keith Packard)
The files here are copied directly from the standalone skiplist module
available from:

	git clone git://cworth.org/~cworth/skiplist

In particular the files come from the double branch and the following
commit on that branch:

	8b5a439c68e220cf1514d9b3141a1dbdce8af585

Also of interest is the original skiplist module hosted by Keith Packard
that is the original implementation on which these files were based.
Since the cworth/skiplist branched off of keithp's, Keith has also
now implemented a doubly-linked variant which might be interesting for
further simplification of the code. See:

	git clone git://keithp.com/git/skiplist

and the double-link branch there.
2006-11-22 16:56:50 -08:00
Carl Worth
02804773e7 give the big-trap test the XFAIL treatment.
We'll need to rewrite this test (and the way cairo is compiled for
testing) before it can exercise the bug of interest. In the
meantime, let's just give it an "expected failure" status.
2006-11-22 16:52:18 -08:00
Carl Worth
fdbb820ece test: Use round to pass only integers to cairo_show_glyphs (in 3 more tests)
This is the same fix as in the recent commit (166dffc96a)
but for the same idiom that appears in the operator-clear,
operator-source, and unbounded-operator tests. This fixes
the failures that were introduced by the recent switch to
_cairo_lround.
2006-11-22 16:43:45 -08:00
Dan Amelang
11d21dbaa3 Change _cairo_matrix_to_pixman_matrix to use a pixman_transform_t as the template, thus avoiding a forced memcpy 2006-11-22 16:25:54 -08:00
Dan Amelang
8a5e296239 Optimize _cairo_matrix_to_pixman_matrix for the common case of an identity matrix 2006-11-22 16:25:54 -08:00
Dan Amelang
b7cd46ddc2 Add and incorporate _cairo_gstate_transform_glyphs_to_backend
After changing _cairo_gstate_show_glyphs and _cairo_gstate_glyph_path to use
this function, we see a significant speedup due to the elimination of redundant
FP calculations.
2006-11-22 16:25:54 -08:00
Dan Amelang
6cfb4a01e0 Refactor _cairo_matrix_is_integer_translation
Now that we have _cairo_matrix_is_translation, we can change
_cairo_matrix_is_integer_translation to use it and thus reduce code
duplication.
2006-11-22 16:25:54 -08:00
Dan Amelang
ca79307bdf Add _cairo_matrix_is_translation 2006-11-22 16:25:54 -08:00
Daniel Amelang
57fba8d9b6 Replace existing rounding code with _cairo_lround 2006-11-22 16:25:53 -08:00
Daniel Amelang
efb483c3a3 Add _cairo_lround for much faster rounding
This function uses the same "magic number" approach as _cairo_fixed_from_double.
2006-11-22 16:25:53 -08:00
Carl Worth
166dffc96a test/clip-operator: Use round to pass only integers to cairo_show_glyphs
We were previously passing half-integer values here, which will
not be robust to changes in the rounding mode used for
cairo_show_glyphs. Use round() to match the rounding expected
by the reference images.
2006-11-22 16:25:53 -08:00
Behdad Esfahbod
eaaeba170d [SVG] Fix compiler warning
cairo-svg-surface.c:980: warning: 'id' might be used uninitialized in this function
2006-11-21 19:05:16 -05:00
Behdad Esfahbod
c6fceb6721 [PS] Rename n_glyphs to num_glyphs_unsigned
Follow-up on my previous commit.  Use a more descriptive name to avoid
confusion between n_glyphs and num_glyphs.
2006-11-21 17:52:58 -05:00
Behdad Esfahbod
75eeb88976 [PS] Eliminate compiler warnings about unoptimizable loops
An innocient-looking loop like this:

  for (j = 0; j <= last; j++)
    something();

cannot be optimized, because it may loop forever!
Imagine the case that last is MAXINT, the loop will never end.  The correct
way to write it is:

  for (j = 0; j < last+1; j++)
    something();

In this case, if last is MAXINT, the loop will never run.  Not correct, but
better than looping forever.

Still better would be to correctly handle the MAXINT case (even though it
doesn't make any sense to show MAXINT number of glyphs in one operation!)  To
do that, we can use the fact that the input num_glyphs is a signed.  If
there is one good thing about using signed int as input length, it's that you
can use an unsigned looping variable to avoid looping forever.  That is
exactly what this patch does.
2006-11-21 12:11:19 -05:00
Emmanuel Pacaud
2dbb3dfd5f SVG: plug a memory leak
What's the point in creating a memory stream if we overload the
pointer a couple of lines below ?
2006-11-21 14:43:43 +01:00
Behdad Esfahbod
12f8718a3e [SVG] Define enum _cairo_svg_version. 2006-11-21 00:22:19 -05:00
Vladimir Vukicevic
9cffc56228 [test] add big-trap test
This test fills a single path (a trapezoid, even) that's larger than the
16.16 precision used in pixman and other code.  It leads to memory
scribbling and a crash.  Note that there is no crash if a clip is not set.
2006-11-20 15:30:04 -08:00
Carl Worth
a91c1e3ea6 Require librsvg 2.15.0 (was 2.14.0) for testing of SVG backend.
Bryce Harrington saw off-by-one errors in output image size with
a 2.14.x version of librsvg.
2006-11-20 14:01:50 -08:00
Carl Worth
e5bd21136c Add const qualifier to cairo_path_t* parameter of cairo_append_path 2006-11-20 09:36:10 -08:00
Emmanuel Pacaud
10920c1326 Merge branch 'svgprint' 2006-11-18 12:59:12 +01:00
Carl Worth
1ed3811338 perf: Add box_outline test case.
This test shows that drawing a 100x100 single-pixel wide box outline is
currently 5 to 16 times slower when using the natural cairo_stroke() as
compared to a rather awkward cairo_fill() of two rectangles.

[ # ]  backend-content                    test-size min(ticks)  min(ms) median(ms) stddev. iterations
[  0]    image-rgba         box-outline-stroke-100     301321    0.218    0.219  0.39%   5
[  1]    image-rgba           box-outline-fill-100      18178    0.013    0.013  0.43%   5
[  0]     xlib-rgba         box-outline-stroke-100     379177    0.275    0.276  1.39%   6
[  1]     xlib-rgba           box-outline-fill-100      83355    0.060    0.060  0.17%   5
2006-11-17 18:00:36 -08:00
Carl Worth
a8faa0aef1 cairo-perf: When iteration count is given on command-line, never execute fewer 2006-11-17 17:48:39 -08:00
Carl Worth
a97b697d8f ROADMAP: Set cairo 1.4 to early January for sake of Gnome 2.18 2006-11-16 10:38:53 -08:00
Carl Worth
db603d6647 Increment cairo version to 1.3.3 after 1.3.2 snapshot 2006-11-15 15:33:52 -08:00
Carl Worth
804e20b55d Update cairo version and libtool version for 1.3.2 snapshot 2006-11-15 13:32:15 -08:00
Carl Worth
c63fd9437b NEWS: Add notes for 1.3.2 snapshot 2006-11-15 13:30:16 -08:00
Behdad Esfahbod
a2d625edc6 Add notes for the 1.2.6 release. 2006-11-14 16:08:58 -08:00
Carl Worth
eeb1fa42aa Add missing pattern-getters-ref.png to Makefile to avoid breaking distcheck target 2006-11-14 15:13:58 -08:00
Carl Worth
28a9f1dd14 Fix get-clip test for surfaces not implementing set_clip_region 2006-11-14 15:13:58 -08:00
Carl Worth
7b86cf513e Remove non-existent reference images from Makefile to avoid breaking distcheck target 2006-11-14 15:13:58 -08:00