Commit graph

3532 commits

Author SHA1 Message Date
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
Carl Worth
bd0b328f7e test/invalid-matrix: Add new test to exercise CAIRO_STATUS_INVALID_MATRIX paths
This new test exercises every path where the user might possibly
pass in an invalid matrix. Currently the test fails if no error
is reported. Also, if an incorrect error is reported, (such as
CAIRO_STATUS_NO_MEMORY instead of CAIRO_STATUS_INVALID_MATRIX),
this is logged as a warning in invalid-matrix.log, but the test
still passes.

It would still be worthwhile to follow up quickly and fix those
cases to propagate the correct error value.
2007-04-11 01:21:10 -07:00
Carl Worth
a6186604f7 cairo_pattern_set_matrix: Validate that matrix is invertible
If not, set an error in the pattern.
2007-04-11 01:21:10 -07:00
Carl Worth
8e72852f0b _cairo_gstate_ensure_scaled_font: Add missing propagation for error hiding inside the scaled_font 2007-04-11 01:21:09 -07:00
Carl Worth
2f1221e0f2 _cairo_gstate_ensure_scaled_font: Prefer to treat a pointer as a pointer, not a Boolean value 2007-04-11 01:21:09 -07:00
Carl Worth
dca69f73e3 Check (and assert) return values of cairo_matrix_invert
Now that we have matrix validation at the time of _cairo_scaled_font_init
we know that it is safe to invert this matrix.
2007-04-11 01:21:09 -07:00
Carl Worth
4ce2b62bce _cairo_scaled_font_init: Detect an invalid matrix and return an error.
Also fix all callers to notice and propagate the error, (though
some paths will still lose the CAIRO_STATUS_INVALID_MATRIX value
due to a return value of NULL at one point).
2007-04-11 01:18:08 -07:00
Carl Worth
fd8c1e4dc8 Fix cairo_scaled_font_create to return a nil scaled font, not NULL 2007-04-10 23:06:57 -07:00
Carl Worth
0f0ed88ee2 paginated: Add missing error check for _cairo_surface_show_page
Fixing this uncovered a leak of a CAIRO_INT_STATUS_UNSUPPORTED value
up to cairo_show_page, (and similarly to cairo_copy_page). There was
really no good reason for _cairo_surface_show_page and
_cairo_surface_copy_page to be returning cairo_int_status_t. Fix
this by simply handling the UNSUPPORTED return at the surface layer
instead of the gstate layer.
2007-04-10 23:01:55 -07:00
Carl Worth
381f0bcafc paginated: Add missing error check for _cairo_surface_get_extents 2007-04-10 22:59:36 -07:00
Carl Worth
41911002d7 test-meta-surface.c: Fix memory leak on error recovery path. 2007-04-10 16:32:09 -07:00
Carl Worth
d954e4c148 Fix indentation of CLEANUP_IMAGE label. 2007-04-10 16:31:21 -07:00
Carl Worth
c011c37ba0 paginated: Fix missing errors checks for _cairo_meta_surface_replay 2007-04-10 16:30:43 -07:00
Carl Worth
e73a55ad3c cairo-truetype-subset: Fix missing error propagation 2007-04-10 14:26:39 -07:00
Carl Worth
97b8fd8117 cairo-truetype-subset: Check resturn value from _cairo_array_append and propagate 2007-04-10 14:26:31 -07:00