Commit graph

3320 commits

Author SHA1 Message Date
Brian Ewins
43577e26b4 [atsui] remove the unused old_show_glyphs function.
_cairo_atsui_old_show_glyphs was a relic of the old quartz 
surface and is no longer required.
2007-03-18 20:20:10 +00:00
Carl Worth
5aaf584bf4 XCB: Fix parameter-order confusion with xcb_create_pixmap
This fixes mask-based clipping with the XCB backend, (which also makes
the xcb backend pass all tests that the xlib backend passes).
2007-03-16 17:46:08 -07:00
Behdad Esfahbod
6f96a5dd99 [win32] Really return unhinted font metrics if metrics hinting is off 2007-03-16 18:21:36 -04:00
Behdad Esfahbod
47e71eef5f [win32] Fix font descent computation 2007-03-16 17:56:53 -04:00
Mathias Hasselmann
dd4601b0d0 [cairo-perf] Emit warning, if cairo-perf is not CPU bound
cairo-perf and the X server should be bound to CPUs (either the same
	or separate) on SMP systems. Not doing so causes random results when
	the X server is moved to or from cairo-perf's CPU during the
	benchmarks.
2007-03-16 20:43:29 +01:00
Gilles Dauphin
d02aa5b23e Don't use unsupported visibily attribute hidden on Solaris
Thanks to Thomas Klausner for passing the report along.
This fixes the following bug report:

	hidden attribute does not work with Solaris ld
	https://bugs.freedesktop.org/show_bug.cgi?id=10227

And as Behdad points out, an even better fix would be to
move checks for supported visibility attribute to configure.
2007-03-16 10:35:23 -07:00
Thomas Klausner
8236282c5d Use "find !" rather than "find -not" for better portability
The man page for GNU find says:
       -not expr
              Same as ! expr, but not POSIX compliant.

And actually, on e.g. NetBSD, "-not" is not supported.

This resolved the following bug:

	https://bugs.freedesktop.org/show_bug.cgi?id=10226
2007-03-16 10:06:51 -07:00
Carl Worth
332c38b6c3 Avoid pulling in -lz for the ps backend.
Quite some time ago we switched from using deflate-based compression to LZW
for the ps backend, (which allows it to target PostScript Level 2 instead of
PostScript Level 3). Now, we finally drop the fact that the ps backend was
still requiring zlib in order to build.
2007-03-15 23:25:06 -07:00
Carl Worth
2242550b48 Make compilation of cairo-deflate-stream.c conditional on compilation of PDF backend.
Otherwise we risk pulling in an otherwise-unneeded dependency on zlib.

This fixes the bug reported here:

	Without PDF surface backend we don't need cairo-deflate-stream
	https://bugs.freedesktop.org/show_bug.cgi?id=10202
2007-03-15 23:17:19 -07:00
Carl Worth
1234064fa4 Allow NULL pointers for functions that accept pointers for multiple return values.
When a single function accepts pointers for multiple return values,
the convention is that it's legal for the user to pass NULL for
those pointers in case the user is only interested in some subset
of the values.

This was already properly implemented for functions such as
cairo_pattern_get_rgba, etc.

Here we fix four functions to follow the same convention:

	cairo_stroke_extents
	cairo_fill_extents
	cairo_clip_extents
	cairo_surface_get_device_offset
2007-03-15 22:38:42 -07:00
Carl Worth
133183d858 Fix cairo_stroke_extents and cairo_in_stroke to not crash with line width of 0.0
This fixes the line-width-zero test case and the bug reported here:

	Crash in cairo_stroke_extents whe line width is 0 and line cap is ROUND
	(_cairo_pen_find_active_cw_vertex_index)
	https://bugs.freedesktop.org/show_bug.cgi?id=10231
2007-03-15 22:09:32 -07:00
Carl Worth
23caa0f43b Add line-width-zero test which currently crashes.
The crash is described in this bug report:

	Crash in cairo_stroke_extents whe line width is 0 and line cap is ROUND
	(_cairo_pen_find_active_cw_vertex_index)
	https://bugs.freedesktop.org/show_bug.cgi?id=10231
2007-03-15 22:09:32 -07:00
Mathias Hasselmann
562bd551bc [cairo-perf-diff] Update usage screen to mention --html. 2007-03-15 12:47:41 +01:00
Carl Worth
6ff2439b33 Implement _cairo_traps_tessellate_triangle with _cairo_traps_tessellate_convex_quad
The newly rewritten convex_quad code is actually simpler than the
triangle code being replaced here. This also allows us to throw
away the problematic _compute_x function which can't handle
horizontal lines, (divide by zero). So the cairo world becomes a
better place.
2007-03-14 17:20:33 -07:00
Carl Worth
53ae6ea957 Fix _cairo_traps_tessellate_convex_quad to handle a == b
This case was found in an attempt to use the convex_quad function
for tessellating triangles as well. Fortunately the fix is very
easy.
2007-03-14 17:20:27 -07:00
Chris Wilson
96d8f58daf Clear the XRender data on display closure.
Use the new hook functions to register a callback for xlib to clear
the private glyph data when the display is closed. In order to do this
we need to reset the glyph cache inside the generic scaled font as well.
2007-03-14 17:20:13 -07:00
Chris Wilson
52405533b1 Privately export a function to reset the scaled font's glyph caches. 2007-03-14 17:20:05 -07:00
Chris Wilson
ad7698feb5 Introduce hooks for _cairo_xlib_close_display()
This patch adds a simple hook data type for a notifier style callback
and introduces two functions to manipulate a list of callbacks for
cleaning up on display closure.
2007-03-14 17:19:55 -07:00
Carl Worth
3d3173d176 Add svg-specific reference image for radial-gradient test.
This isn't strictly needed, (pdiff allows the test to pass without the
image), but it sure runs faster this way.
2007-03-14 17:19:48 -07:00
Carl Worth
75201c12be check-def.sh: Adjust test to exempt _cairo_test_* functions as well as _cairo_*_test_*
This test started failing with the recent renaming of the following
three functions, (before they had no cairo in their names so they
were not getting picked up at all):

_cairo_test_fallback_surface_create
_cairo_test_meta_surface_create
_cairo_test_paginated_surface_create_for_data

With this change, the failure now goes away again.
2007-03-14 15:48:15 -07:00
Carl Worth
5d23d0c90c Remove dead-code remnants of old tessellator 2007-03-14 15:23:01 -07:00
Carl Worth
1f3a5b4e12 Fix bugs in _cairo_traps_tessellate_convex_quad
The previous code was not handling all cases correctly, (yes,
even something as simple as a quadrilateral can exhibit a
remarkably large number of different cases when tessellation
is attempted).

This fix now introduces slope comparison which handles several
cases that were mis-handled with the previous implementation which
only used independent sorting of the X and Y values of the
coordinates.

This fixes the skew-extreme test case and the bug reported here:

	Skew transforms were broken by the cairo update in December
	https://bugzilla.mozilla.org/show_bug.cgi?id=373632
2007-03-14 15:06:36 -07:00
Carl Worth
0a6ae06c35 Add new skew-extreme test case.
This test currently fails, demonstrating the bug reported here:

	Skew transforms were broken by the cairo update in December
	https://bugzilla.mozilla.org/show_bug.cgi?id=373632
2007-03-14 15:06:36 -07:00
Carl Worth
40b6d8842e Remove radial-gradient test from XFAIL list
This test has not been failing since the fix in:

	772edc9133

So get rid of the '1 unexpected passes' complaint.
2007-03-14 15:06:36 -07:00
Behdad Esfahbod
e803e2e69b [cairo-pattern] Add a cache of two color stops to cairo_gradient_pattern_t
Most of gradients have only two color stops.  This avoids
calling malloc() for those cases.
2007-03-14 17:24:54 -04:00
Behdad Esfahbod
4514fdca1b [cairo-pattern] Grow color-stops array exponentially 2007-03-14 17:24:54 -04:00
Mathias Hasselmann
e878f2259b Include pixman/src in cairo-perf hash 2007-03-14 21:47:39 +01:00
Mathias Hasselmann
1a3f5df5ff Add index.html to .gitignore 2007-03-14 21:42:50 +01:00
Mathias Hasselmann
c40be43aef Transform the output of cairo-perf-diff into HTML 2007-03-14 21:41:40 +01:00
Mathias Hasselmann
f1dd48475a Improve CPU utilization when building cairo-perf 2007-03-14 21:18:09 +01:00
Behdad Esfahbod
a7595c1295 [Makefile.am] Do not distribute cairo-features.h, Ouch!
We were accidentally doing that by not marking it noinst.
Moreover, no need to mark it as BUILD_SOURCES, since it's
created by configure, not make.
2007-03-13 17:21:19 -04:00
Behdad Esfahbod
f3c8d82d6d [test] If backends are limited and all untested, pass the test
This is necessary to ensure that limiting backends using
CAIRO_TEST_TARGET does not increase the number of tests failing,
which is a desirable invariant.
2007-03-13 16:51:34 -04:00
Behdad Esfahbod
30b5f1baa8 [test] In pattern-getters test, log what went wrong 2007-03-13 16:50:10 -04:00
Behdad Esfahbod
9267cb0424 [cairo-pattern] Use _cairo_color_double_to_short() to fix color conversion 2007-03-13 16:49:42 -04:00
Behdad Esfahbod
60502ba348 [cairo-color] Add cairo-private _cairo_color_double_to_short() 2007-03-13 16:13:35 -04:00
Behdad Esfahbod
956fdfbb62 [cairo-pattern] Fix color conversion from short to double
We should divide by 65535.0, not 65536.0.
2007-03-13 06:30:11 -04:00
Behdad Esfahbod
2030490862 [cairo-pattern] Add XXX note 2007-03-13 06:20:21 -04:00
Behdad Esfahbod
deed0f4734 [polygon,spline,traps] Avoid free(NULL) 2007-03-13 06:09:09 -04:00
Behdad Esfahbod
b706bd9b38 [cairo-polygon] Add a cache of eight edges to cairo_polygon_t
Many, if not most, of polygons have very few edges.  This avoids
calling malloc() for those cases.
2007-03-13 06:07:03 -04:00
Behdad Esfahbod
d8165d5424 [cairo-spline] Fix typo in comment 2007-03-13 05:59:33 -04:00
Behdad Esfahbod
cca7e3fec3 [cairo_polygon_t] Change has_current_point from int to cairo_bool_t 2007-03-13 05:56:38 -04:00
Behdad Esfahbod
81e15a454b [cairo_polygon_t] Remove unused member 'closed' 2007-03-13 05:55:45 -04:00
Behdad Esfahbod
2bf4ce389d [cairo_polygon_t] Reorder struct members for clarity 2007-03-13 05:53:13 -04:00
Behdad Esfahbod
3ce84390de [cairo-polygon] Clean-up realloc algorithm for clarity 2007-03-13 05:51:39 -04:00
Behdad Esfahbod
6976ab1392 [cairo-slope] Make comparison stable if both vectors are zero 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
9eee167210 [cairo-spline] Add a cache of eight points to cairo_spline_t
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 05:14:20 -04:00
Behdad Esfahbod
1e64ecf075 [cairo-spline] Clean-up realloc algorithm for clarity 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
cee687a33f [cairo_traps_t] Reorder struct members for clarity 2007-03-13 05:14:20 -04:00
Behdad Esfahbod
24aec99ffb [cairo-traps] Add a cache of one trapezoid to cairo_traps_t
Seems like half the time, we just need one trap.  This avoids
calling malloc() for those cases.
2007-03-13 05:14:19 -04:00
Behdad Esfahbod
4737416c6e [cairo-traps] Clean-up realloc algorithm for clarity 2007-03-13 05:14:19 -04:00