Commit graph

3546 commits

Author SHA1 Message Date
Chris Wilson
8a4c108a4b Add a reference count to cairo_xlib_screen_info_t
Due to the interaction between multiple threads showing glyphs and
asynchronous CloseDisplays, it is possible for a font to maintain a
cairo_xlib_screen_info_t beyond the CloseDisplay. The simple solution
is to add a reference count in order to track the lifetime of the
cairo_xlib_screen_info_t correctly.
2007-04-12 23:31:37 +01:00
Carl Worth
50ef5bcf7b Revert cairo_public_warn addition to cairo.h
This new feature isn't appropriate for a minor cairo release,
(we're between 1.4.2 and 1.4.4 right now), but will make a
lot of sense during 1.5.

The code being reverted here was originally added with the
following commit:

	46eab95698

but this change reverts only the public-facing parts of it.
2007-04-12 13:46:03 -07:00
Chris Wilson
35bb2152c0 Hold the scaled_font->mutex whilst operating on the shared members.
Obey the locking rules whilst resetting the scaled_font after a
CloseDisplay.
2007-04-12 21:44:08 +01:00
Chris Wilson
97d897a747 cairo_xlib_close_display - drop the mutex whilst calling the hooks
In order to avoid recursive dead-locks where whilst one thread holds the
scaled font lock and is waiting on the XLockDisplay() another thread catches
the CloseDisplay and then tries to acquire the scaled font lock, we drop
the list mutex whilst processing the callbacks.
2007-04-12 21:43:47 +01:00
Carl Worth
13b0aa669f Rebuild doc/public/Headers.mk
Add a sort so that future update changes will be more legible.
2007-04-12 13:29:56 -07:00
Carl Worth
ae80d375f8 Rename cairo-mutex-list.h to cairo-mutex-list-private.h
Also add it (and cairo-mutex-private.h) to Makefile.am
where they should have been.
2007-04-12 13:22:36 -07:00
Carl Worth
29adf591b7 move show-glyphs-many to the DISABLED_TESTS list
And add a detailed comment explaining the reasons for disabling each
test in the list.
2007-04-12 12:47:27 -07:00
Chris Wilson
c5b2f9d5c2 cairo_xlib_screen_info_t - always perform an exact match
This ensures that only one cairo_xlib_screen_info_t holds the
close_display_hooks, an assumption used later.
2007-04-12 12:34:53 -07:00
Chris Wilson
8c9f0f607b cairo-xlib-screen - avoid dereferencing a NULL screen.
Do not initialize font options when setting up the
cairo_xlib_screen_info_t corresponding to the display itself and not
associated with any screen. This avoids a potential NULL dereferences.

(Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10517)
2007-04-12 12:34:53 -07:00
Behdad Esfahbod
dc1de86680 [ROADMAP] Add cairo_object_t 2007-04-12 15:06:37 -04:00
Behdad Esfahbod
12b962d648 [ROADMAP] Mark bug #5777 as fixed 2007-04-12 14:56:36 -04:00
Behdad Esfahbod
e391d3eaee [test] Disable text-glyph-range that was crashing
Disabled tests are defined in DISABLED_TESTS.  This has the benefit
that they will still be buildable and be shipped.  Just not run by
default.
2007-04-12 14:44:32 -04:00
Behdad Esfahbod
d3c7942fb2 [pixman] Mark some small functions that are called per-pixel inline
These uses were introduced in the previous commit.
2007-04-12 14:44:32 -04:00
David Reveman
e3b3d22999 [pixman] Fix fbcompose.c that was broken for some composite operations (#5777) 2007-04-12 14:44:32 -04:00
Vladimir Vukicevic
c8d2d1e876 add licenses to test files 2007-04-12 10:51:17 -07:00
Michael Emmel
e240048a14 Merge branch 'master' of ssh+git://git.cairographics.org/git/cairo 2007-04-11 21:43:15 -07:00
Michael Emmel
29a1fe12cf Fixed compile error from missing directfb.h include 2007-04-11 21:42:57 -07:00
Kristian Høgsberg
977a8982ab Add missing copyright notice. 2007-04-11 23:49:01 -04:00
Behdad Esfahbod
9193b29645 [ROADMAP] Mark done items 2007-04-11 23:30:31 -04:00
Chris Wilson
284edb8648 Do not raise an error if we fail to locate 'find' or 'xargs'
Whilst not being able to delete all of the test output is messy it is
however not fatal, so do not abort configuration simply because we
cannot find either program.
2007-04-12 03:01:31 +01:00
Chris Wilson
a8974223dc Check for find and xargs during configure
Replace hard-coded find, xargs and rm with the paths determined during
configure. This also gives us an opportunity to detect missing programs
and inform the developer.
2007-04-12 02:31:03 +01:00
Behdad Esfahbod
632ec8088c [test] Add copyright headers for my tests 2007-04-11 20:18:11 -04:00
Chris Wilson
82397a6314 Avoid using GNU find extensions.
Replace the complex single find with a series of simple but POSIX correct
equivalents.
2007-04-12 00:55:04 +01:00
Behdad Esfahbod
06382092e5 [pdiff] Ship gpl.txt 2007-04-11 19:43:01 -04:00
Carl Worth
c8645c85de Merge branch 'master' of git.cairographics.org:/git/cairo into cairo 2007-04-11 16:38:46 -07:00
Chris Wilson
52435e99f3 Move pixman_format_t from heap to stack allocations.
pixman_format_t is a simple structure used in short-term allocations and
suitable for on-stack allocation.

Killing the pixman_format_create()/pixman_format_destroy() pairs avoid
around 6% of the allocations during cairo-perf (e.g. 426,158 allocs out
of a total of 7,063,469).
2007-04-12 00:28:03 +01:00
Carl Worth
be98123b2c Merge cached-scaled-font-in-error into cairo
Conflicts:

	src/cairo-scaled-font.c
2007-04-11 16:02:08 -07:00
Chris Wilson
a6506c67f2 Don't return scaled fonts in the error state from the cache.
It is possible for a scaled_font to be flagged as in error, though only
through a "true error" e.g. a malloc failure. However, when returning a font
from the cache it should not be in error. So if we find a error font in the
cache we remove it and return a new font.
2007-04-11 15:57:03 -07:00
Carl Worth
efedf57f43 cairo-truetype-subset.c: Add missing error checks and propagation
These are all to satisfy new warnings caused by the preceding commit,
(which added cairo_warn to various function tables). While fixing the
propoagation, fix functions to declare a return type of cairo_status_t
instead of int.
2007-04-11 15:25:18 -07:00
Chris Wilson
e6ca34e718 Mark function tables with attribute(warn_unused_result) 2007-04-11 14:44:54 -07:00
Chris Wilson
3bc413343a Define cairo_public_warn in terms of cairo_public.
By defining cairo_public_warn as an extension of cairo_public, the
programmer need only to override cairo_public in order to export the
complete API for different architectures i.e. existing configurations
will continue to work with no alterations.
2007-04-11 14:39:56 -07:00
Chris Wilson
54134dd901 Only enable warn-unused-result for recent gcc
The attribute was introduced with gcc-3.4, but the ability to suppress
warnings from misapplied attributes (-Wno-attributes) was only introduced
later. Without the supression, gcc will emit tens of warnings for each
compilation completely drowning the real errors that the programmer
must see.
2007-04-11 14:39:50 -07:00
Chris Wilson
f53c2b418c _pixman_create_source_image() - check for malloc failure
Fix an unchecked malloc by propagating the NULL pointer up to its callers,
which were already checking for failures.
2007-04-11 14:33:53 -07:00
Adrian Johnson
d0745c08b7 PDF: Fix glyph positioning bug when glyphs are not horizontal
Bug reported in
http://lists.freedesktop.org/archives/cairo/2007-April/010337.html
2007-04-12 06:32:29 +09:30
Carl Worth
e36794ad34 Merge branch 'warn-unused-result' into cairo 2007-04-11 13:15:57 -07:00
Chris Wilson
b745126a04 Use find | xargs to overcome shell command line limit.
Once again we have hit the command line limit with the sheer volume of
generated test output. So replace the glob with a find which has the
additional advantage of only needing to walk the tree once to generate
the file lists - this begins to be noticeable with such large directories.
2007-04-11 13:07:06 -07:00
Chris Wilson
61b8e34613 Unexport fbSolidFillmmx and fbCopyAreammx.
By unexporting these function we have exact control over their call sites
and so can convert the initial guards into asserts which transforms the
two functions to return unconditional success and hence conversion to
void.
2007-04-11 13:06:29 -07:00
Chris Wilson
efee208738 Propagate errors up through pixman_composite_trapezoids()
Change the return type to indicate errors detected during
pixman_composite_trapezoids() and add checking for failures during
region ops.
2007-04-11 13:05:31 -07:00
Chris Wilson
bec097b5e2 Propagate region errors from pixman_color_rects().
Region operations within pixman_color_rects can fail, so cleanup and
propagate.
2007-04-11 13:04:53 -07:00
Chris Wilson
909334ee00 FbClipImage* should check for errors during region operations.
Propagate the error from pixman_region_intersect().
2007-04-11 13:03:38 -07:00
Chris Wilson
5b67efcbd8 Propagate region failures during pixman_image_set_clip_region().
Operating on regions can fail so check the status and return an error,
after any necessary cleanup.
2007-04-11 13:02:56 -07:00
Chris Wilson
e1abc3c26d Provide a private entry point for cairo_scaled_font_status().
Add slim_hidden* markup for cairo_scaled_font_status() as we now use
it internally.
2007-04-11 13:02:23 -07:00
Carl Worth
054c28a09d boilerplate: Add error checking for cairo_surface_write_to_png 2007-04-11 02:50:49 -07:00
Carl Worth
0a54ca2d23 boilerplate: Add error checking for cairo_surface_set_user_data 2007-04-11 02:50:42 -07:00
Carl Worth
5661de9e1c SVG: Add missing error checking for calls to _cairo_output_stream_destroy 2007-04-11 02:08:36 -07:00
Carl Worth
8d5aa0fb8d SVG: Add missing error checks and propagation
The function calls that get the new treatment here are:

	_cairo_meta_surface_replay
	_cairo_surface_show_page
	_cairo_array_append

all within _cairo_svg_surface_emit_meta_surface
2007-04-11 02:03:10 -07:00
Carl Worth
9c810625e7 PDF: Added error checking and propagation for _cairo_array_append 2007-04-11 01:55:59 -07:00
Carl Worth
5ae82deb69 PS: Add missing check for return value of _cairo_meta_surface_replay
Here we have to change the return type of a couple of functions in
order to propagate the error condition.
2007-04-11 01:47:21 -07:00
Carl Worth
8c31cca2af PS: Add missing checks for return value of _cairo_pattern_get_extents
Propagation is extremely straightforward in this case.
2007-04-11 01:42:02 -07:00
Carl Worth
01ac5f1aea Assert that cairo_matrix_invert succeeds rather than ignoring tis return value
This assertion is safe as an internal consistency check thanks to
the recent checks added to cairo_pattern_set_matrix.
2007-04-11 01:35:11 -07:00