Commit graph

4172 commits

Author SHA1 Message Date
Adrian Johnson
b5fa273c9a Add PS reference images for tests using create_similar
before the PS meta surface pattern patch these tests
had image fallacks in the PS output and did not require
a PS reference image.
2007-10-13 21:04:51 +09:30
Adrian Johnson
8520ce31be PS: Add meta surface pattern support 2007-10-13 20:17:43 +09:30
Chris Wilson
e5b01e6797 [Makefile.am] Add missing headers and reference images.
Andrew Jorgensen spotted that make dist was missing a few headers needed
for compilation and running make distcheck had spurious failures. Add
the missing files to the distribution and a silly one-liner to check for
missing reference images.
2007-10-11 18:05:46 +01:00
Chris Wilson
b7adcf67f8 [cairo-path-stroke] Jump to cleanup after error.
Incorrect early return in _cairo_stroker_curve_to() after
_cairo_stroker_join() resulted in leaking the local spline and pen.
2007-10-11 15:01:14 +01:00
Chris Wilson
0222c02d95 [cairo-pdf-surface] Return UNSUPPORTED from _to_unicode_stream().
Distinguish the UNSUPPORTED case where the font backend does not
support conversion to unicode from other fatal errors by returning a
status value rather than using stream.id == 0 to indicate any error.
2007-10-11 15:00:59 +01:00
Chris Wilson
981bc12e5b [cairo-ps-surface] Close a couple of memory leaks.
Adjust error paths to free local resources.
2007-10-11 15:00:47 +01:00
Chris Wilson
c1db44b265 [cairo-png] Clean up volatile warning.
gcc warns that 'rows' is missing a volatile qualifier - so add it.
2007-10-11 15:00:35 +01:00
Chris Wilson
05702b8b6e [cairo-pdf-surface] Free the clip path on error.
If we fail to add the clip path to the current group, destroy it.
2007-10-11 15:00:22 +01:00
Chris Wilson
8fa5f638a5 [cairo-pdf-surface] Restore old_group for failed emit_meta_surface().
Ensure we restore the surface->current_group if we encounter an error
during _cairo_pdf_surface_emit_meta_surface() lest we leak the
current_group array.
2007-10-11 15:00:13 +01:00
Vladimir Vukicevic
8eb9fcf673 [win32] mask win32 printing vertex colors with 0xff00 per docs
The range for the vertex color structures is 0x0000 .. 0xff00; I
think that this is an error in the docs, but strip out the low bits
just in case.
2007-10-10 14:05:39 -07:00
Vladimir Vukicevic
3545ebc135 Fix win32 printing surface copyright notice
Bad copy-and-paste of license.
2007-10-10 14:05:39 -07:00
Chris Wilson
0b65c301a7 [Makefile.am] Change lcov-clean to use more portable constructs.
Replace xargs and rm with the binaries found by configure and drop the
passing of NUL-terminated strings as that is a GNU extension.
2007-10-10 14:56:52 +01:00
Chris Wilson
b8d7d62b08 Fix some trivial syntax warnings for -ansi.
gcc -ansi -pedantic gives a few syntax warnings, principally for use of
'//' comments and a comma at the end of enumerators. Apply these
corrections as they are trivial.
2007-10-10 14:56:52 +01:00
Chris Wilson
7e6ac74de1 [win32] Clean up compiler warnings.
Fix up a few instances of unused status returns.
2007-10-10 14:24:24 +01:00
Chris Wilson
bee05467a5 [configure.in] Initialise test_svg.
Set test_svg to no prior for checking for SVG availability so that the
printed summary is correct if the user explicitly disables the SVG
surface on the configure command line.
2007-10-10 14:24:12 +01:00
Chris Wilson
785cb5b7e1 [cairo-image-surface] Dead code elimination.
Remove an unreachable return and unused variable - tidy up after
a bad merge.
2007-10-10 14:23:34 +01:00
Chris Wilson
2268c5907c [cairo-glitz-surface] Propagate errors from set_image().
Propagate errors from _cairo_glitz_surface_set_image().
2007-10-10 14:23:10 +01:00
Chris Wilson
4958789b9e [cairo-xlib-surface] Propagate error from _draw_image_surface() to surface.
Instead of simply ignoring the error that may occur when we upload the
destination image to the xlib surface (via XPutImage) record the error
on the xlib surface.
2007-10-10 14:22:49 +01:00
Chris Wilson
9c65efeeb1 [boilerplate-test-surfaces] Check show page for errors.
Check that cairo_surface_show_page() did not generate any errors before
reading back the image buffer and saving it as a png.
2007-10-10 14:22:25 +01:00
Chris Wilson
caf04b1bb8 [cairo-cff-subset] Propagate error status from failed append_copy().
Add a couple of missing status checks for the result of
cff_index_append_copy().
2007-10-10 14:22:13 +01:00
Chris Wilson
ef275cd65a [test-meta-surface] Propagate error from show_page().
Add a missing error propagation for _test_meta_surface_show_page().
2007-10-10 14:22:00 +01:00
Chris Wilson
7758e56d0c [cairo-hull] Remove a couple of redundant status returns.
Those two functions unconditionally returned success, so change the
return to void.
2007-10-10 14:21:51 +01:00
Chris Wilson
1dabfc2b27 [cairo-clip] Propagate error status from clip_intersect_path().
Propagate the error status (filtering out UNSUPPORTED) from
intersect_path() when reapplying the clip path during a deep copy.
2007-10-10 14:21:39 +01:00
Chris Wilson
32b78fffc3 [cairo-traps] Simplify the status interaction of traps_grow().
Simply return the error status from the traps_grow() function rather
than having an assignment in the return function and then immediately
another assignment of the error to the status member at its callsite.
2007-10-10 14:21:25 +01:00
Chris Wilson
66563eddd8 [cairo-pdf-surface] Check status return after emit_meta_pattern().
Add the missing status propagation.
2007-10-10 14:20:19 +01:00
Vladimir Vukicevic
be7d1f0f8f Simplify CAIRO_REFERENCE_COUNT_INVALID macro
MSVC doesn't like the previous anonymous structure/cast, so simplify
to just a bare {} structure for use as an initializer.
2007-10-09 14:27:53 -07:00
Vladimir Vukicevic
712c3cda44 [win32] reduce GDI object usage
Only create region objects if they're necessary; this significantly reduces
the number of GDI objects in use by cairo surfaces.
2007-10-09 14:12:07 -07:00
Vladimir Vukicevic
c99d33b10e [win32] return a nil surface, not NULL
Missed an error return
2007-10-09 13:57:00 -07:00
Vladimir Vukicevic
4dbf495515 [win32] report error correctly if CreateCompatibleBitmap fails
These errors were being dropped on the floor, leading to
rendering errors in out of video memory conditions.
2007-10-09 13:57:00 -07:00
Vladimir Vukicevic
61ba63f3a0 [win32] remove ignore_operators flag from win32 printing surface
Remove the ignore_operators fallback-avoiding workaround; if apps
want that same behaviour, they'll have to implement it themselves
by taking care when calling cairo_set_operator().
2007-10-09 13:56:59 -07:00
Behdad Esfahbod
b12ed375cf [ChangeLog.mk] Fix changelog generation rules
Previously it was trying to get logs of 1.2.0..1.4 while I really meant
was 1.2.0..1.4.0.  It was a simple typo.
2007-10-09 15:54:58 -04:00
Adrian Johnson
cbc4087a40 Type1 subset: Add check for CFF fonts 2007-10-06 19:18:31 +09:30
Chris Wilson
a1633df6ee [cairo-scaled-font-subsets] Increment the sub_font counter after insertion.
Do not modify the parent subsets->num_sub_font until after we have
successfully created the sub_font and inserted it into the hash table.
2007-10-05 18:47:24 +01:00
Chris Wilson
cf2f994a31 [cairo-paginated-surface] Propagate backend errors to the surface.
If we call a srface backend function directly, then it our
responsibility to propagate any fatal errors to the surface.
2007-10-05 18:35:12 +01:00
Chris Wilson
3da62fdd28 [cairo-xlib-display] Rescan the displays list during shutdown.
As we drop the list mutex whilst calling the hooks during the
XCloseDisplay callback, we must rescan the list when we reacquire the
mutex in order to remove the display from the list.
2007-10-05 18:34:58 +01:00
Chris Wilson
737cbd25a6 [cairo-ps-surface] Cleanup ps surface after creation failure.
If we fail to create the paginated wrapper for the ps surface, cleanup
the resources allocated for the surface.
2007-10-05 18:34:44 +01:00
Chris Wilson
31b52779ba [cairo-boilerplate-xlib] Cleanup fallback after creation failure.
Cleanup the local resource if we fail to create the X window and
surface for the xlib fallback test target.
2007-10-05 18:34:32 +01:00
Chris Wilson
b210bea6c1 [cairo-pdf-surface] Check for pdf_resource_t allocation failure.
Check that the resources are actually allocated or propagate the error.
2007-10-05 18:34:11 +01:00
Chris Wilson
5ac7ba9821 [cairo-pdf-surface] Destroy local resources on failed surface creation.
During _cairo_pdf_surface_create_for_stream_internal() destroy all
locally allocated resources and the output stream if we fail to create
the pdf surface or its paginated wrapper.
2007-10-05 18:34:01 +01:00
Chris Wilson
63ddfa077c [cairo-pdf-surface] Propagate error status.
Add a few missing propagations of error status.
2007-10-05 18:33:48 +01:00
Chris Wilson
f1b6e2735c [cairo-ps-surface] Propagate errors from emit_pattern().
Do not discard the error status from _cairo_ps_surface_emit_pattern(),
but propagate it back to the caller.
2007-10-05 18:33:38 +01:00
Chris Wilson
709f316036 Cleanup a couple of warnings for use of uninitialized statuses.
The compiler spotted a couple of potential uses of an uninitialized
status variable - apply the obvious fixes.
2007-10-05 17:37:05 +01:00
Chris Wilson
2f22510e22 [cairo-xlib] Initialize the global mutexes.
The xlib surface creation routines will eventually attempt to lock the
global _cairo_xlib_display_mutex. Under the default environment this is
a non-issue as the CAIRO_MUTEX_INITIALIZE/FINALIZE become no-ops under
pthreads. However, for the sake of correctness (i.e. to silence the
lockdep debugger!) insert a call to initialize the global mutexes at the
start of the public entry points.
2007-10-05 16:25:02 +01:00
Chris Wilson
d2557cd5ee [test-paginated] Free resources if fail to create the test surface.
Ensure that all the locally allocated resources are freed if we fail
to allocate the paginated test surface.
2007-10-05 16:16:36 +01:00
Chris Wilson
60ffeecd48 [test-surfaces] Mark the test backend as static.
There is no need to export the test surface backends, so mark them
static.
2007-10-05 16:16:36 +01:00
Chris Wilson
6598973661 [cairo-scaled-font-subset] Propagate errors during collection.
Propagate the errors encountered whilst iterating over the scaled font
subsets ie _cairo_scaled_font_subsets_foreach_scaled() and co.
2007-10-05 15:26:30 +01:00
Chris Wilson
3a2dd9d336 [cairo-png] Markup a couple of original error sites with _cairo_error().
Add the _cairo_error() markup to the original error sites within the png
read/write functions.
2007-10-05 15:26:14 +01:00
Chris Wilson
81243ee7ef [cairo-scaled-font] Mask cannot be NULL so remove redundant check.
We either generate a mask for the glyphs or throw an error and bypass
the check, so at that point mask can never be NULL and we do not need
the test.
2007-10-05 15:26:03 +01:00
Chris Wilson
f3d921baca [cairo-scaled-font] Destroy the zombie font.
If we do not transfer the font to the holdovers array (because it has
been removed from the cache and left in a zombie state), destroy it.
2007-10-05 15:25:47 +01:00
Chris Wilson
41aab58f3a [cairo-surface] Add the usual guards to the API entry point.
Add the checks for unmodifiable surfaces (snapshots, finished and error) to
cairo_surface_set_fallback_resolution.
2007-10-05 15:25:32 +01:00