Commit graph

721 commits

Author SHA1 Message Date
Carl Worth
620de68bea Turn the mutex code back on. It looks like the deadlocks have disappeared as of the cairo_scaled_font_map patch from two days ago.
Setup an automake conditional for the HAVE_PTHREAD case.
Link all tests with -lpthread if available, so that we can get some testing of cairo with mutexes turned on.
2005-08-13 03:26:18 +00:00
Billy Biggs
58c51ff137 Update to match the output from libpixman. 2005-08-10 21:12:10 +00:00
Keith Packard
eacc1e95a5 Place private include directives before CAIRO_CFLAGS in case pixman remains installed in the system. 2005-08-10 13:32:06 +00:00
Carl Worth
0fc4192104 From Keith Packard <keithp@keithp.com>,
Build pixman internally as a private part of cairo, with suitable name changes to avoid any visible pixman symbols in the cairo library:
Descend into pixman.
Drop libpixman from Requires.
Don't check for libpixman. Check version of pkg-config and use Requires.private instead of Requires in cairo.pc if possible. Generate pixman Makefiles.
Rip out release-publish target and installation of libpixman.pc.
Add pixman-remap.h. Drop libpixman.la target.
Fix to include config.h rather than ../config.h
This is the cpp magic to rename all pixman functions from the various fb, Fb, INT_pixman, pixman, Render, _Render, or no prefix to _cairo_pixman_ prefixes.
Include pixman-remap.h to get all the cairo-internalized names.
Add -Ipixman/src to get at pixman-remap.h.
2005-08-10 12:36:51 +00:00
Carl Worth
a391bb451a Note that sane clipping is done now. Add release versions for previously completed items.
Ignore unantialiased-shapes.
2005-08-09 12:35:09 +00:00
Carl Worth
4d2b8bddde Fix typo that was holding up make distcheck from working. 2005-08-08 20:57:13 +00:00
Billy Biggs
53444c286e Add a new API for disabling antialiasing of shapes drawn by cairo. This is a hint and is not supported by all backends.
Store the antialiasing mode in the gstate and pass it to the backend for trapezoid rendering and for clipping.
Pass the antialiasing parameter down to the backend where appropriate.
Pass the antialiasing parameter down to the backend where appropriate.
Add support for A1 format trapezoid rendering, and remove the _create_mask_image function, creating a temporary image from memory we allocate and clear.
Support A1 masks to disable antialiasing using the RENDER extension when requested.
Support A1 masks to disable antialiasing using the RENDER extension when requested.
Blindly pass through the antialising parameter.
Add the antialiasing parameter but don't support it.
Add a test case and a reference image from the latest libpixman.
Add the new antialiasing disabling API to the docs.
Update progress on a parameter to disable antialiasing.
reviewed by: cworth, otaylor
2005-08-08 18:35:22 +00:00
Carl Worth
578b45c903 Ignore clip-operator and unbounded-operator. 2005-08-08 17:32:24 +00:00
Owen Taylor
d4b24dc974 Add reference images 2005-08-08 13:50:02 +00:00
Owen Taylor
8f19aaf9a8 Add a function to test whether a cairo_operator_t is bounded (does nothing for 0 src/mask)
cairoint.h: Add a helper function to take clearing areas that are outside the source/mask but are cleared by unbounded operations.
src/cairo-xlib-surface.c (_cairo_xlib_surface_composite): Use _cairo_surface_composite_fixup_unbounded() as needed.
src/cairo-image-surface.c src/cairint.h: Keep track of whether the surface has a clip or not ... we need this for determining when we can bypass an intermediate mask for composite_trapezoids().
Create an intermediate mask of the right size with pixman_add_trapezoids() and composite that.
When rendering with an unbounded operator, create the intermediate mask ourselves and render with ADD to that, then composite the result.
Create an intermediate surface the size of the extents, render the glyphs to that then composite the results.
Add the size of the glyph
Compute the size of the glyph mask, then use _cairo_surface_composite_fixup_unbounded().
Use the right mask format. (Unrelated bugfix)
New function taking a drawing function as a parameter to encapsulate shared logic between compositing trapezoid, glyphs, and masks.
Use _cairo_gstate_clip_and_composite(). Also fix extents computations for unbounded operators.
src/cairo-clip.c src/cairo-clip-private.h (_cairo_clip_combine_to_surface): Add the destination as an extra parameter to allow combining to an intermediate surface.
tests/unbounded-operator.c tests/Makefile.am: Add a test for the operation of the 6 unbounded operators against different shapes.
tests/clip-operator.c tests/Makefile.am: Add a test that tests surface clipping with different shapes against all the operators.
Make use OVER like the name and description. With fixed semantics, SOURCE does something different.
2005-08-08 13:46:11 +00:00
Jeff Muizelaar
8c52b287f3 Give reason for failure. 2005-08-06 15:10:36 +00:00
Carl Worth
8d0452c1ee ignore a8-mask 2005-08-05 15:49:52 +00:00
Carl Worth
5925e3520f Patch memory leaks. 2005-08-05 15:48:42 +00:00
Jeff Muizelaar
53bd9879bb Add a test case for CAIRO_FORMAT_A8 masks that fails with libpixman. 2005-08-05 15:07:45 +00:00
Jeff Muizelaar
594ba3ef69 use the newly added buffer_diff_noalpha for comparing buffers of CAIRO_FORMAT_RGB24. 2005-08-05 11:23:51 +00:00
Jeff Muizelaar
5f78feda5d rewrite buffer_diff to be endian safe and add a new fuction buffer_diff_noalpha 2005-08-05 11:15:04 +00:00
Carl Worth
7d88cdd15b Remove unused variable. 2005-08-05 10:43:07 +00:00
Carl Worth
e59d1dff7f Ignore cairo-clip-private.h.
Drop non-existent cairo-atsui.xml.
Fix misnamed parameters in comment blocks.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
2005-08-05 10:40:32 +00:00
Carl Worth
a2dc18fd0c Remove include of math.h since cairoint.h does it more carefully, (for annoying platforms for which just including math.h without extra defines is not enough).
Replace Cairo with cairo.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
Fix non-UTF-8 copyright symbol.
2005-08-05 10:05:29 +00:00
Carl Worth
0586daaa29 Patch from John Ehresman <jpe@wingide.com> to aid win32 compilation:
Define snprintf as _snprintf when under the influence of _MSC_VER.
Define int32_t and friends as __int32 and friends when under the influence of _MSC_VER.
Make include of unistd.h conditional on HAVE_UNISTD_H.
2005-08-05 07:48:18 +00:00
Carl Worth
b45f688765 Fix for bug #3951:
Add new _CHECK_FUNCS_WITH_FLAGS to abstract out the pain of temporarily setting flags for AC_CHECK_FUNCS. Use this to check for the existence of FcFini.
Make call to FcFini conditional on HAVE_FCFINI.
Remove stale comment about cleaning up memory which is now handled by cairo-test.c.
2005-08-03 10:32:50 +00:00
Owen Taylor
500cc6fed1 src/cairo-gstate.c src/cairo-gstate-private.h: Store the inverse CTM at the time of cairo_gstate_set_source() to "lock" the user space matrix.
Move the source pattern transformation to the outside of _cairo_gstate_clip_and_composite_trapezoids() instead of doing it at the leaves.
Change size of output surface for aesthetics.
Updated to correspond to the current definition.
Remove source-surface-scale-paint.
reviewed by: cworth
2005-08-01 14:39:01 +00:00
Carl Worth
c525c684ca New public header file.
New function to reset all static data (eg. caches) to their initial state.
Fix check-valgrind target to depend on the 'all' target.
Add check for a new, proposed, XrmFinalize function.
Add cairo-debug.c.
Move the definition of CAIRO_BEGIN_DECLS to cairo-features.h so that it can be shared between public header files, and so that it doesn't clutter cairo.h
Implement reset_static_data in all modules as required.
Call cairo_debug_reset_static_data and FcFini so that we can have all tests be valgrind-clean with respect to memory leaks and still-reachable data.
2005-08-01 13:33:47 +00:00
Carl Worth
26289b3664 Add two new tests: mask-ctm mask-surface-ctm demonstrating that masks are not currently being modified by the CTM. 2005-07-28 15:55:00 +00:00
Carl Worth
08e810f5c1 Remove text-antialias-subpixel-ref.png from the list since it doesn't exist yet. 2005-07-28 11:41:37 +00:00
Carl Worth
1481fa5132 Add text-antialias-{gray|none|subpixel}-ref.png so they get distributed. 2005-07-28 11:33:11 +00:00
Dave Beckett
e604017c77 Use cairo_surface_status(image) instead of testing for NULL from cairo_image_surface_create_from_png to enable testing when srcdir != builddir again. 2005-07-28 11:22:36 +00:00
Carl Worth
a83124a3ee Fix so that one of three different error status values will be returned:
CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR
Add new CAIRO_STATUS_FILE_NOT_FOUND.
Add new _cairo_surface_nil_read_error and _cairo_surface_nil_file_not_found.
Test the new FILE_NOT_FOUND error.
2005-07-28 10:41:08 +00:00
Owen Taylor
d7699f0c07 Remove text-antialias-none which is now fixed.
No longer xfail.
2005-07-27 19:13:39 +00:00
Carl Worth
2b5d9c8e00 Add CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, and CAIRO_STATUS_INVALID_VISUAL.
Change functions to return type of void:
cairo_scaled_font_extents cairo_surface_finish
Add new functions to query object status:
cairo_scaled_font_status cairo_surface_status
Implementation of new error handling scheme for cairo_surface_t and cairo_scaled_font_t.
Track change in return value of cairo_surface_finish.
2005-07-27 15:39:34 +00:00
Carl Worth
255913de9e Note that the XFAIL tests all need to be fixed before 1.0.
Add three new tests for testing the various antialiasing options for text rendering.
2005-07-27 13:28:15 +00:00
Carl Worth
8cb451962b Fix typo that caused cairo_image_surface_create_from_png_stream to segfault. Closes bug #3863 (thanks to Steve Chaplin).
Add a test to actually call cairo_image_surface_create_from_png_stream.
2005-07-27 09:23:29 +00:00
Keith Packard
88cf98fe33 Add Screen* arguments to:
cairo_xlib_surface_create_with_xrender_format cairo_xlib_surface_create_for_bitmap
Required to correctly identify when two Xlib surfaces are compatible with Core and Render rendering requests.
cairo_xlib_surface_create can determine the screen given the required Visual *
reviewed by: otaylor
2005-07-20 18:52:31 +00:00
Carl Worth
cd587375e3 Add valgrind suppressions for libpng/libz use of uninitialized data. There are clearly bugs here that are not cairo's fault as zeroing the buffer before writing the png image actually causes more errors(\!). And, notably, setting all the data to random bytes usually makes the errors go away.
Change the check-valgrind target to include the .valgrind-suppresions file and to tee output into valgrind.log.
2005-07-18 14:35:54 +00:00
Carl Worth
f0fae1d1bc Fix leak of pattern. 2005-07-18 08:23:21 +00:00
Carl Worth
751e059f5c Note some progress.
New helper function to help create an image surface from a PNG file, while taking the srcdir environment variable into consideration. Rename the pattern creating helper function to match.
Use new cairo_test_create_surface_from_png so that non-srcdir builds work.
Track change in cairo_test_create_pattern_from_png.
2005-07-18 08:04:16 +00:00
Vladimir Vukicevic
8ad8aa6360 Use XCopyArea when possible, for optimization and bug workaround.
Exercise XCopyArea, XRenderComposite, and XSetTile/XFillRectangle paths for _cairo_xlib_surface_composite
2005-07-15 13:45:19 +00:00
Carl Worth
2534057cb5 Add new check-valgrind target for running the test suite under the influence of valgrind.
Fix memory leak when reference image is not found.
2005-07-15 10:39:59 +00:00
Carl Worth
07d09acf2a Fix a few memory leaks (missing cairo_pattern_destroy in 3 places). 2005-07-15 01:38:38 +00:00
Carl Worth
89a9771b60 Remove errant line of code that was inadvertently committed recently. 2005-07-15 00:56:58 +00:00
Carl Worth
3e05319bf8 Fix leak of surface. 2005-07-14 17:55:58 +00:00
Carl Worth
40edca337e Rewrite to use cairo_image_surface_create_from_png rather than custom read_png_argb32. In addition to being simpler, this eliminates the leak of the image data buffer.
Add calls to cairo_pattern_destroy to close two memory leaks.
2005-07-14 16:18:39 +00:00
Carl Worth
3cd006bb2b Fix to accept a cairo_pattern_t rather than a cairo_surface_t as the primary argument.
Track change in _cairo_pattern_release_surface and also pass the appropriate pattern for each acquired surface. The previous backend mismatch was causing memory leaks.
Remove stale comment.
Add missing fclose to keep valgrind happy about memory leaks.
2005-07-14 15:10:47 +00:00
Carl Worth
288f0f7f49 Make the per-backend test results print XFAIL rather than FAIL for expected failures. 2005-07-14 12:50:28 +00:00
Carl Worth
6f6c9196c8 Fix comment describing test result. It's not enough that all tested backends are successful. We also require that at least one backend is actually tested. 2005-07-14 12:25:41 +00:00
Carl Worth
456e3ffc4d Don't consider a test to fail if it can't create a surface at all (eg. no X server is available). Instead mark this backend as untested and only consider the overall test a success if all tested backend are successful. 2005-07-14 12:20:42 +00:00
Carl Worth
574b702029 Rename create-for-png test to create-from-png to match the naming of the cairo_image_surface_create_from_png function. 2005-07-14 11:17:12 +00:00
Carl Worth
c41e9d698f Patch a few memory leaks. 2005-07-14 11:11:15 +00:00
Carl Worth
9a2ba48b29 Give enum tags an underscore prefix to match the style of the struct tags. Add new cairo_content_t and change cairo_surface_create_similar to accept a cairo_content_t rather than a cairo_format_t.
Change surface backend create_similar call to accept a cairo_content_t rather than a cairo_format_t.
Fix all calls into create_similar to pass a cairo_content_t rather than a cairo_format_t.
2005-07-08 10:12:28 +00:00
Carl Worth
f766e06d25 Remove CAIRO_STATUS_NO_TARGET_SURFAC and add CAIRO_STATUS_INVALID_STATUS.
Don't check for gstate->target == NULL anymore as the API now guarantees it never occurs.
Check that path->status is a valid status value and cause an INVALID_STATUS error otherwise.
Test the new CAIRO_STATUS_INVALID_STATUS error case in cairo_append_path.
2005-07-06 14:52:01 +00:00