Commit graph

141 commits

Author SHA1 Message Date
Chris Wilson
6003ab77e1 Export meta-surface
The meta-surface is a vital tool to record a trace of drawing commands
in-memory. As such it is used throughout cairo.

The value of such a surface is immediately obvious and should be
applicable for many applications. The first such case is by
cairo-test-trace which wants to record the entire graph of drawing commands
that affect a surface in the event of a failure.
2009-07-03 18:26:50 +01:00
Chris Wilson
758a18b354 [test] Timeout support for tests
Enforce that each test must render within 60 seconds or be considered to
have hit an infinite loop and be reported as a CRASH. The timeout value is
adjustable via CAIRO_TEST_TIMEOUT -- a value of 0 will disable.
2009-06-28 21:10:30 +01:00
Chris Wilson
b82e7740c1 [atomic] Silence compiler warnings by defining an intptr_t
Evaulate the integer sizes during configure to find one of the exact same
size as a void* to use in the conversion of the atomic ptr cmpxchg to an
atomic int cmpxchg.
2009-06-21 22:25:08 +01:00
M Joonas Pihlaja
fd142d0a6e [shave] Robuster usage of the test shell built-in.
Solaris 9 confuses shave, resulting in an empty variable.
This patch papers over the resulting build failure from
the test shell built-in being called with an empty argument
which was unquoted.
2009-06-18 16:14:50 +01:00
M Joonas Pihlaja
742b1ad4b0 [test] Fix checking of the fenv.h include.
This adds a configure check for fenv.h and makes
invalid-matrix.c check for it with HAVE_FENV_H instead
of HAVE_FEDISABLEEXCEPT -- turns out Solaris doesn't
have fedisableexcept(), but it does have feclearexcept().

The same issue appears on OSX and was fixed in
ab86662ab4. This patch
adds some configure magic.
2009-06-18 16:07:56 +01:00
M Joonas Pihlaja
aafff0b952 [boilerplate] Check for connect() in libsocket.
Solaris requires -lsocket to be able to talk to
the any2ppm daemon over unix domain sockets.
2009-06-18 15:48:59 +01:00
M Joonas Pihlaja
cdd27a8d4c [test] Never use gcc __attribute__ magic for constructors.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect.  This causes the test
suite to not run any tests at all.  With this patch we revert to
always using make-cairo-test-constructors.pl.
2009-06-18 15:39:16 +01:00
Vladimir Vukicevic
22587f57bd Import Qt backend by Mozilla
Written by Vladimir Vukicevic to enable integration with Qt embedded
devices, this backend allows cairo code to target QPainter, and use
it as a source for other cairo backends.

This imports the sources from mozilla-central:
http://mxr.mozilla.org/mozilla-central/find?text=&kind=text&string=cairo-qpainter
renames them from cairo-qpainter to cairo-qt, and integrates the patch
by Oleg Romashin:
https://bugs.freedesktop.org/attachment.cgi?id=18953

And then attempts to restore 'make check' to full functionality.

However:
 - C++ does not play well with the PLT symbol hiding, and leaks into the
   global namespace. 'make check' fails at check-plt.sh

 - Qt embeds a GUI into QApplication which it requires to construct any
   QPainter drawable, i.e. used by the boilerplate to create a cairo-qt
   surface, and this leaks fonts (cairo-ft-fonts no less) causing assertion
   failures that all cairo objects are accounted for upon destruction.

[Updated by Chris Wilson]
Acked-by: Jeff Muizelaar <jeff@infidigm.net>
Acked-by: Carl Worth <cworth@cworth.org>
2009-06-16 11:03:46 +01:00
Chris Wilson
3fe50a77ea [configure] Rephrase warning message for disabling core features.
"strictly recommended" is an odd phrase and though the stern warning is
appropriate as replacing a system library with a more limited version is
likely to cause mayhem, we are but mere servants and should be reserved in
our parlance.
2009-06-15 12:02:25 +01:00
Chris Wilson
c092136fe9 [configure] Check for shm_open()
As needed for cairo-test-trace.
2009-06-13 19:07:37 +01:00
Carl Worth
d008167b9b Makefile: Fix two typos preventing doc-publish from working
It seems that everything up to this point in release-publish
worked fine, so with these fixes, hopefully the next run of
make release-publish will work without any snags.
2009-06-12 12:08:22 -07:00
Chris Wilson
7f114b781f [doc] Workaround read-only tree during make distcheck
This looks to be an ugly necessity to work-around the nasty issue that
we currently gtkdoc expect to be run inside the source tree. I'm sure
Behdad will be able to resolve this much more elegantly than this quick
and fragile attempt.
2009-06-12 11:15:16 +01:00
Carl Worth
19630f4b73 Make the warning about the need to --enable-gtk-doc more explicit.
I must have read it three times and kept thinking, "but I *did*
just install gtk-doc", before I finally understood what it was
trying to tell me.
2009-06-11 14:54:03 -07:00
Chris Wilson
3aaea453b0 [script] Store fonts inside mmaped files.
As an aide to tiny swapless systems write the rarely used bytes that
define type42 fonts into a deleted file and mmap them back into our
address space.
2009-06-11 22:38:09 +01:00
Chris Wilson
4ccfd474a3 [perf] Switch to using clock_gettime()
Try using clock_gettime() for a high resolution stable time source in
preference to the potentially unstable TSC.
2009-06-06 13:37:00 +01:00
Chris Wilson
e4efc80b8e [build] Make valgrind support user-configurable
As the number of places where we add valgrind client requests grows, it
becomes imperative that we should be able to disable them with a simple
configure time option.
2009-05-25 22:14:56 +01:00
Chris Wilson
477df1f550 [test] Clear expected floating point exceptions
test/invalid-matrix deliberately feeds garbage into the API to test our
error detection. This causes FPE to be raised during the course of the
test - so they are deliberately disable for the duration. However, the
exceptions were not being cleared and so the FPE could be triggered on
the next floating point operation. This was being masked during make check,
by the fact that each test is run in its own forked process and was only
observed when multiple tests were run in foreground mode.
2009-05-15 21:31:03 +01:00
Chris Wilson
849bdee199 [check] Quieten output during checking headers-standalone
Remove the duplication of the compile line and enable shave to replace it
entirely with a "CHECK $header". This should make errors more obvious.
2009-05-07 15:14:14 +01:00
Chris Wilson
84fad4b11b [build] Fix gtk-doc interoperation with shave
Add --tag=CC to the libtool invocations.
2009-05-07 15:14:14 +01:00
Chris Wilson
fd72c56af8 [build] Report status of gtk-doc in summary 2009-05-07 15:14:13 +01:00
Chris Wilson
6675cf5587 [build] Add lcov-1.7 to known list 2009-05-05 21:17:04 +01:00
Chris Wilson
526fcdb7e6 [build] Enable shave support
shave transforms the messy output of autotools into a pretty (quiet!)
Kbuild-like one.

Lets see how controversial a simple change can be...
2009-05-05 21:16:55 +01:00
Jeff Muizelaar
f853972636 [win32] Fix building with libpng and zlib
Include zlib and libpng dependencies using something like '$(cairo_dir)/../zlib/zdll.lib'
instead of just 'zdll.lib'. Also, do similarly for the headers.
2009-04-07 14:50:25 -04:00
Behdad Esfahbod
3ec94f9b59 Support compiling without fontconfig
Adds a new, fake, fontconfig font backend.  Fontconfig can be disabled
using --disable-fc, in which case the toy text API wont find fonts and
the internal font will always be used.

Also defines the feature macro CAIRO_HAS_FC_FONT.  The two fontconfig-specific
functions in cairo-ft.h depend on that macro now.
2009-03-17 00:58:40 -04:00
Ginn Chen
e4b1f871e9 [configure] Detect mkdir variant with non-gcc compilers.
It doesn't work for non GCC compiler right now, as "-Werror -Wall" is
an error to non GCC compiler.

I swapped the sequence of build/configure.ac.system and build/
configure.ac.warnings, then WARN_CFLAGS can be used.
2009-03-03 10:27:44 +00:00
M Joonas Pihlaja
e380beae53 [sdl] Remove new backend.
The SDL backend makes invalid assumptions about SDL_Surface locking
semantics and doesn't deal correctly with the unpremultiplied pixel
format supported by SDL.  Removed as per discussion on the mailing list.

http://lists.cairographics.org/archives/cairo/2009-February/016595.html
2009-02-16 14:01:43 +02:00
Behdad Esfahbod
06deaa98b6 [build] Include all generated win32 build files in the repo
So a git clone can be built on win32.  The files only change after adding
new backends.
2009-01-09 15:55:24 -05:00
Chris Wilson
333158ec85 [configure] Replace awk comparator with an aclocal version
As reported in https://bugs.freedesktop.org/show_bug.cgi?id=19283, the
fallback freetype version compare is broken inside the configure script as
the $1-$3 arguments are interpreted as the script is constructed. To avoid
making that awk comparison any more complicated, we import a version compare
from the autoconf archives - such that we have a reusable macro for the
furture.
2009-01-02 15:44:52 +00:00
Behdad Esfahbod
6778a5f67a [.gitignore] Update 2008-12-17 16:20:18 -05:00
Chris Wilson
43edb4dd7b Fix compilation with gcov
We need to add --coverage to LDFLAGS, so create CAIRO_LDFLAGS and use that
to populate AM_LDFLAGS.
2008-12-14 16:44:03 +00:00
Chris Wilson
1c2eba92c1 [RELEASING] Update Makefile for git-1.6
Git moved all the subcommands out of the PATH, so we need to update our
usage.
2008-12-14 16:41:01 +00:00
Behdad Esfahbod
aff32019a7 [Makefile.am] Use top_srcdir instead of srcdir
Doesn't make much difference here, but makes our intention clear.
2008-11-30 23:28:59 -05:00
Chris Wilson
5e37652362 [skiplist] Check for ffs()
Wine at least does not provide ffs(), so check at configure time and
open-code a replacement.
2008-11-26 17:26:57 +00:00
Chris Wilson
997fa6a772 [configure] Remove old line for CairoScript testing.
CairoScript testing should now be unconditional so remove the surplus
message.
2008-11-16 17:43:40 +00:00
Chris Wilson
a856371bef Add CairoScript backend.
A new meta-surface backend for serialising drawing operations to a
CairoScript file. The principal use (as currently envisaged) is to provide
a round-trip testing mechanism for CairoScript - i.e. we can generate
script files for every test in the suite and check that we can replay them
with perfect fidelity. (Obviously this does not provide complete coverage
of CairoScript's syntax, but should give reasonable coverage over the
operators.)
2008-11-13 11:36:54 +00:00
Behdad Esfahbod
310026ab42 [aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363) 2008-11-04 01:51:06 -05:00
Chris Wilson
c554f18d78 [util] Add cairo-trace.
This tool can be used to trace all the cairo function calls made by an
applications.  This is useful for either extracting a test case triggering
a bug from an application, or simply to get a general idea of how an
application is using cairo.

After make install, cairo-trace program arguments, will print out all the
cairo calls to the terminal and also capture theme in ./program.$pid.trace

The format of the output is CairoScript, watch this space for more
cairo-script tools!
2008-10-31 15:37:58 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Behdad Esfahbod
b146130841 [Makefile.am.releasing] Symlink /manual and /cairo-manual.tar.gz only for releases
And not for snapshots.  Also symlink /cairo-manual-X.Y.Z.tar.gz for all
versions.
2008-10-30 14:35:51 -04:00
Chris Wilson
cf072c7203 [sdl] Add new backend.
Add a new backend to allow easy interoperability with the Simple
DirectMedia Layer.
2008-10-30 17:04:53 +00:00
Carl Worth
b598dcd1b1 Fix release-publish to also update the current manual.
That is, the vesion that appears as:

	http://cairographics.org/manual
and:
	http://cairographics.org/cairo-manual.tar.gz

It was silly that we previously required a manual step to
upload the documentation (which we regularly forgot to do)
and that it uploaded with a date in the name rather than a
version. So we just drop the old doc-publish Makefile target
now as it's just not useful anymore.
2008-10-30 08:29:51 -07:00
Behdad Esfahbod
1522805f39 [Makefile.am.releasing] Fix typo 2008-10-27 20:57:56 -04:00
Carl Worth
3386794d96 Add creation of a versioned manual to the release-publish target.
This arranges so that a versioned manual will be available of the form:

	http://cairographics.org/manual-X.Y.Z

for all future releases and snapshots. We're going through the process
of manually doing all former releases, such as:

	http://cairographics.org/manual-1.2.0/

which the LSB folks wanted to reference.
2008-10-27 14:09:19 -07:00
Chris Wilson
195fd27cc6 [build] Use AC_LINK_IFELSE for testing linker flags.
Richard Hult reported that -Wl,--allow-shlib-undefined was incorrectly
being identified as supported by gcc under Mac OS/X:

configure:25103: checking whether gcc supports -Wl,--allow-shlib-undefined
configure:25117: gcc -c -Werror -Wl,--allow-shlib-undefined  conftest.c
>&5
i686-apple-darwin9-gcc-4.0.1: --allow-shlib-undefined: linker input file
unused because linking not done

So instead of just checking whether the compiler accepts the flag, check
that we can actually link a dummy file.
2008-10-23 11:16:40 +01:00
Behdad Esfahbod
9d4262ebe0 [build] Use dolt
Dolt is a hack to speed up libtool-based build systems:

	http://dolt.freedesktop.org/

It's completely transparent to the user.  Brings make time
of cairo from 70s down to 20s.  Yay!
2008-10-21 17:45:54 -04:00
Chris Wilson
fd1f3c27e0 [configure] Check for atomic xchg.
Bug 18140 identifies a case where we have an atomic increment, but not an
atomic exchange. We need both to implement atomic reference counting, so
add a second check to detect whether __sync_val_compare_and_swap
generates a non-atomic instruction.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18140.
2008-10-21 09:23:15 +01:00
Chris Wilson
4ba9ccc6ab [configure.ac.analysis] s/safe/_save/
Rename the temporary variable in line with the convention used by the rest
of the build system.
2008-10-20 23:07:38 +01:00
Chris Wilson
bccfdf7d93 [test] Add support for memfault.
Add the core support to cairo-test for running the test-suite under a
malloc fault injector. This commit contains the adjustments to
cairo_test_run() to repeat the test if it detects a failure due to fault
injection and complains if it detects unreported faults or memory leaks.
2008-10-17 22:52:47 +01:00
Chris Wilson
91b0dc92c8 [build] Add -fno-common.
Generate a warning if two files define a global variable with the same
name, instead of silently merging them to reference the same location.
2008-10-15 23:12:22 +01:00
Behdad Esfahbod
5beae8f530 [Makefile.am.releasing] Make 'make snapshot' print a banner when done
Copied from "make distcheck" implementation.  Prints something like:

=============================================================
cairo-1.8.1-20081006-38de89 archives ready for distribution:
cairo-1.8.1-20081006-38de89.tar.gz
=============================================================
2008-10-06 12:46:41 -04:00