Commit graph

3333 commits

Author SHA1 Message Date
Mathias Hasselmann
be52178443 Initialize mutexes at central location.
All mutex declarations have been moved to cairo-mutex-list.h.
This should avoid breaking of less frequently tested backends,
when mutexes are introduced or when existing mutexes are renamed.

Instead of initializing mutexes on library startup, mutexes are
lazily initialized within the few entry points of now by calling
CAIRO_MUTEX_INITIALIZE(). Currently only the OS/2 backend takes
care about releasing global mutexes. Therefore there is no counter
part of that macro for finalizing all global mutexes yet - but
as cairo-backend-os2.c shows such a function would be quite
easy to implement.
2007-03-20 10:11:14 +01:00
Carl Worth
aba2b299db boilerplate: Add EXTRA_LTLIBRARIES to CLEANFILES to allow make distcleancheck to pass. 2007-03-19 23:50:13 -07:00
Carl Worth
2483542b74 Add skew-extreme-ref.png to the tar file for the release. 2007-03-19 23:37:28 -07:00
Carl Worth
b91ff39214 Increment cairo version to 1.4.2 (and libtool versioning to 13:1:11) 2007-03-19 23:24:26 -07:00
Carl Worth
04b3de48f5 NEWS: Add notes for cairo 1.4.2 2007-03-19 23:22:39 -07:00
Carl Worth
1401f20eb9 Temporarily remove extend-reflect from the list of tests.
This test is known to sometimes cause an X server to enter a near-
infinite loop. That's a reall unkind thing to inflict upon our
users who are being nice enough to test cairo. Let's disable
this test for the 1.4.2 release.
2007-03-19 22:39:40 -07:00
Carl Worth
725a4de42d Propagate a nil surface out of _cairo_surface_create_similar_scratch
We detect an error in the surface before calling into private surface-modifying
functions, (such as _cairo_surface_set_font_options), that don't have the
nil-surface protection of public functions.

This should fix the problem reported (again) in this bug report:

	cairo crashes in cairo_create_simular if nil surface returned by other->backend->create_similar
	https://bugs.freedesktop.org/show_bug.cgi?id=9844

Though I haven't succeeded in replicating the bug yet, (perhaps a system
difference in allowing writes to read-only memory or not, or something
like that).
2007-03-19 16:50:55 -07:00
Carl Worth
eb472a9d9c xlib: Prefer surface->format over surface->visual for identifying masks
The original test for 'if (surface->visual)' dates back to a very old
assumption that if the xlib surface was created with an XRenderFormat
that the surface->visual field would be set to NULL. This assumption
was broken years ago with the following commit:

	0c05b23b31

This fixes the crash reported here:

	BadMatch when running gnome-terminal with the murrine-0.51 gtk engine
	https://bugs.freedesktop.org/show_bug.cgi?id=10250
2007-03-19 15:10:33 -07:00
Behdad Esfahbod
d27c42cc3f [boilerplate] Don't build in make all 2007-03-19 17:42:06 -04:00
Brian Ewins
12feb1f986 [quartz] apply ctm to text (#9568)
Applies the ctm to text output on the quartz surface. This corrects
the text-pattern test, and also corrects the size of text when the
ctm includes a scale.
2007-03-19 18:22:44 +00:00
Brian Ewins
986b0ff838 [atsui] make text_to_glyphs return positions in user units. (#9568)
text_to_glyphs was returning positions in device units; correct this
to use user units.
2007-03-19 18:21:27 +00:00
Brian Ewins
06a4483927 [atsui] store sizes in the atsui font
The ATSUStyle that we store in the font contains references to
the size and font matrix; we need to store them in the font so that
they are not released before the style.
2007-03-18 20:20:11 +00:00
Brian Ewins
240479d10d [atsui] refactor CreateSizedCopyOfStyle
This is just to make it easier to use with passed-in matrices,
which I'll make use of in a subsequent patch.
2007-03-18 20:20:10 +00:00
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