Commit graph

3419 commits

Author SHA1 Message Date
Chris Wilson
b32a5b1dc6 cairo-pattern - propagate status
Catch, cleanup and propagate after an error return.
2007-04-09 15:05:35 +01:00
Chris Wilson
fd49bbb4b2 cairo-path - check for failure during _cairo_path_fixed_interpret
Catch an error return from _cairo_path_fixed_interpret() and return
it. Similary check for an error code in cairo_status() before returning
success.
2007-04-09 15:05:24 +01:00
Chris Wilson
814830f63b cairo-path-fill - trivial missing unused result
Actually assign the result that is tested on the next line...
2007-04-09 15:05:13 +01:00
Chris Wilson
7ab1f62c60 cairo-paginated-surface - fix up the trivial unused result
Check for status returns and propagate, cleaning up as necessary.
2007-04-09 15:04:58 +01:00
Chris Wilson
78c0d62ba7 cairo-meta-surface - propagate trivial status return
_cairo_path_fixed_init_copy() could fail so propagate it's status.
2007-04-09 15:04:47 +01:00
Chris Wilson
75cc5e04d5 cairo-image-surface - propagate error returns from pixman.
pixman does occasionally return an error - in such circumstances we
should propagate it.
2007-04-09 15:04:30 +01:00
Chris Wilson
dee9a53029 cairo-gstate - fix the trivial unchecked returns
Check for an error return and propagate.
2007-04-09 15:04:17 +01:00
Chris Wilson
de264af2c6 cairo-ft-font - handle trivial failures
Catch the status return, cleanup and propagate the error.
2007-04-09 15:03:59 +01:00
Chris Wilson
14c8dfb0b9 cairo-clip - handle trivial pixman failures
Detect the simple cases when pixman returns an error, ie an OOM
condition, and propagate the error status.
2007-04-09 15:03:34 +01:00
Chris Wilson
274c20c27a cairo-boilerplate - handle failure to set user data
After failing to set the user data on a surface, clean up and return NULL.
2007-04-09 15:02:17 +01:00
Chris Wilson
46eab95698 Add attribute(warn_unused_result)
This adds a compiler check that the function result is used by the caller
and enables it by default for all cairo_private functions and for public
API that returns a cairo_status_t.

It has been discussed that to extend the warnings to all functions, a
new function type could been introduced to cover static functions:
cairo_static. This has not been done at the present time in order to
minimise the churn and focus on the more common errors.

In order to reduce the warning spew generated by gcc for invalid use of
this attribute, -Wno-attributes is added to CFLAGS. This has the
unfortunate side-effect of masking future warnings for all attributes -
be warned!
2007-04-09 15:01:58 +01:00
Behdad Esfahbod
9da86e4a38 Add references to the skiplist paper 2007-04-08 22:56:30 -04:00
Behdad Esfahbod
ad0e13805c [cairo-skiplist] Clarify MAX_LEVEL in comment, and adjust accordingly
Reading the code, MAX_LEVEL is in fact what could have been named
MAX_NUM_LEVELS.  That is, it is maximum possible level plus one.
All code is correct: it uses MAX_LEVEL as array size and never produces
a level of MAX_LEVEL.  The comment is fixed.
2007-04-08 22:51:10 -04:00
Behdad Esfahbod
e8072e6e0a [test,perf] Make them rebuild boilerplate when src is changed 2007-04-08 22:03:46 -04:00
Behdad Esfahbod
6f93092217 Rename pixman_region_uninit to pixman_region_fini 2007-04-08 22:03:38 -04:00
Behdad Esfahbod
4f8a04b1c9 [pixman-image] Simply initialization given that there is no clip 2007-04-08 21:55:45 -04:00
Mathias Hasselmann
df9ea31df5 [pixman-region] Separate pixman_region_init
Most of the time pixman_region_init is called without any extents, and
followed by a pixman_region_union_rect, used to used to initialize
rectangular regions. pixman_region_union_rect is not that cheap, but
the sequence is called quite often. So it should be worth introducing
a specialized and fast function for this sequence.

This introduces pixman_region_init_rect.  This new function makes
_cairo_region_init_from_rectangle obsolete.

Also removes the extent argument from pixman_region_init as it was
called with NULL most of the time.  A pixman_region_init_with_extents
is added for the general case.
2007-04-08 21:49:46 -04:00
Mathias Hasselmann
9436959a83 Update function map 2007-04-08 21:36:34 -04:00
Mathias Hasselmann
99f4bfada8 Remove abdoned pixman_region_{create,destroy} 2007-04-08 21:36:06 -04:00
Mathias Hasselmann
4532c023e0 Make clientClip region static, remove abdoned CT_PIXMAP code paths 2007-04-08 21:35:58 -04:00
Mathias Hasselmann
65f269f3a4 Avoid pixman_region_create in pixman_composite{,General} 2007-04-08 21:34:10 -04:00
Mathias Hasselmann
82cc451148 Make clip regions of pixman_image_t static 2007-04-08 21:32:52 -04:00
Mathias Hasselmann
0413715337 Avoid pixman_region_create in pixman_color_rects 2007-04-08 21:27:34 -04:00
Mathias Hasselmann
5a6ca4794b Replace pixman_region_create_simple by pixman_region_init 2007-04-08 21:25:25 -04:00
Mathias Hasselmann
f9057f2752 Avoid pixman_create_region in glitz-surface 2007-04-08 21:24:35 -04:00
Mathias Hasselmann
82cbb6886c Remove redundant _cairo_clip_fini function 2007-04-08 21:23:47 -04:00
Mathias Hasselmann
5ae309c456 Avoid pixman_region_create in _cairo_traps_extract_region 2007-04-08 21:23:13 -04:00
Mathias Hasselmann
241482b550 Avoid malloc in _cairo_region_create_from_rectangle 2007-04-08 21:12:02 -04:00
Mathias Hasselmann
efc9775149 Make sure clip->region is always initialized 2007-04-08 21:10:58 -04:00
Mathias Hasselmann
0e7df34e07 Make region of cairo_clip_t static 2007-04-08 21:10:12 -04:00
Mathias Hasselmann
ced7b4a4ab Make pixman_region_{init,uninit} public 2007-04-08 20:38:32 -04:00
Mathias Hasselmann
4d9065fceb Move struct pixman_region16 to pixman.h 2007-04-08 20:38:17 -04:00
Behdad Esfahbod
dce3e5e6b5 [TODO] Add 4945 Cairo doesn't support 8-bit pseudocolor visuals 2007-04-06 17:20:49 -04:00
Chris Wilson
8bb0e5939c _get_bitmap_surface - check for calloc failure 2007-04-06 12:34:17 -07:00
Chris Wilson
b95577a931 Protect boilerplate_xlib_synchronize from alloc failure.
Don't call XDestroyImage on a NULL image.
2007-04-06 12:18:49 -07:00
Chris Wilson
2a74fd5c7f Propagate one error return through pdf. 2007-04-06 11:50:00 -07:00
Behdad Esfahbod
a2a8f2ce7a [ROADMAP] Move David Turner's cairo-ft rewrite to 1.6. 2007-04-05 20:03:51 -04:00
Carl Worth
94460a9790 ROADMAP/TODO: Update with 1.4.4 and 1.6 items from recent meeting 2007-04-05 16:35:17 -07:00
Robert O'Callahan
d801aa59f8 [quartz] fix floating point precision issue (#10531)
This ensures that error due to double-to-float conversion
does not accumulate; the position of any glyph will be off by
at most one double-to-float conversion error.
2007-04-06 00:00:33 +01:00
Carl Worth
106f859045 Move misplaced CLEANUP_FONT label to avoid crash.
Previously, a failure in _cairo_win32_scaled_font_init_glyph_path leading
to the CLEANUP_FONT label would set the path into the glyph, then destroy
the path, and return an error status, (which in turn would cause a double
free when the glyph was destroyed).

The double-free apparently leads to a crash in some cases, as described
here:

	 SVG/Cairo related crash when opening specific webpage
	https://bugzilla.mozilla.org/show_bug.cgi?id=376498

This should eliminate the double-free, but does not address the original
error case, (attempting to get a path from a bitmap font?).
2007-04-05 14:44:15 -07:00
Chris Wilson
5c24711ee6 Restore gcov functionality
Add -lgcov to the shared library else the test programs fail to link.
Add a couple of lcov convenience targets to generate the coverage reports.
2007-04-04 10:13:13 +01:00
Behdad Esfahbod
59e5189818 [Makefile.am] Distribute BIBLIOGRAPHY
Also include all automatically distributed CAPITAL files in there,
to remove any doubts.
2007-04-03 20:46:14 -04:00
Behdad Esfahbod
a1287e483c [pixman/src/check-config.sh] Test that all source files #include <config.h>
as their first include.
2007-04-03 20:30:30 -04:00
Behdad Esfahbod
8fbf50d31d [src] Make sure all source files #include "cairoint.h" as their first include
This is necessary to avoid many portability problems as cairoint.h includes
config.h.  Without a test, we will regress again, hence add it.

The inclusion idiom for cairo now is:

	#include "cairoint.h"

	#include "cairo-something.h"
	#include "cairo-anotherthing-private.h"

	#include <some-library.h>
	#include <other-library/other-file.h>

Moreover, some standard headers files are included from cairoint.h and need
not be included again.
2007-04-03 20:28:11 -04:00
Behdad Esfahbod
ffc7d06da0 [src/check-cairoint.h] Test to check that all source files #include "cairoint.h"
as their first include.
2007-04-03 20:27:24 -04:00
Brian Ewins
3646839060 [boilerplate] split quartz out to avoid symbol clash.
Quartz and Xlib both define Picture and Cursor, and clashed in
cairo-boilerplate.c. Splitting quartz out allows a single mac 
build with --enable-quartz --enable-atsui.
2007-04-04 01:16:30 +01:00
Behdad Esfahbod
174ebc43fe [pixman] Make sure all source files include config.h
as their first include.
2007-04-03 20:02:48 -04:00
Behdad Esfahbod
208c32b245 [cairoint.h] Remove inline definition for MS compilers
Such things should go to config.h.  For one thing, cairoint.h is not
included in pixman.
2007-04-03 20:02:40 -04:00
Behdad Esfahbod
313a6f7321 [pixman] Cleanup inline mess (#10150)
Simply use "inline" instead of "INLINE" or "__inline__" and let
configure figure out what to use.
2007-04-03 20:02:10 -04:00
Behdad Esfahbod
88dc0c5f19 Make sure all nil objects start with _cairo_
Previously, the convention was that static ones started with cairo_, but
renamed to start with _cairo_ when they were needed from other files and
became cairo_private instead of static...

This is error prune indeed, and two symbols were already violating.  Now
all nil objects start with _cairo_.
2007-04-03 19:26:18 -04:00