Commit graph

87 commits

Author SHA1 Message Date
Chris Wilson
d2f251f84b configure: Globally define AC_GNU_SOURCE
We were using _GNU_SOURCE throughout the codebase, so simply define it
once during configure. This is the easiest method to enable recursive
mutexes using pthreads, as required in a pending patch.
2010-01-22 23:01:50 +00:00
Andrea Canciani
1ce096657b Fix compilation on MacOS X
Enable "ld_preload" (DYLD_INSERT_LIBRARIES + DYLD_FORCE_FLAT_NAMESPACE)
and build cairo-trace as a library instead of a module to make it
work also on MacOS X.
2009-11-09 16:59:31 +00:00
Chris Wilson
9b42b6156d build: Add -pthread to real_pthread_CFLAGS 2009-11-02 12:50:45 +00:00
Benjamin Otte
3eecf2f60c sphinx: Add required pthread libs
Try again, this time for real hopefully.
2009-11-02 13:20:25 +01:00
Chris Wilson
837eb577b4 sphinx: Add required pthread libs
Switching to pthread-stubs broke the build for sphinx on unbroken
platforms [those that do not unnecessarily link against -lpthreads].
2009-11-02 12:01:45 +00:00
M Joonas Pihlaja
43a775f60d [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:

http://lists.cairographics.org/archives/cairo/2009-July/017571.html
2009-10-22 02:29:47 +03:00
Chris Wilson
dac73d260a [build] Link against pthread-stubs
Avoid pulling in the real pthread library if the application is single
threaded and not using pthreads, by linking against pthread-stubs
instead.
2009-10-15 13:05:47 +01:00
M Joonas Pihlaja
cf0fed2191 [build] Check for dlsym in both libdl and libc.
The BSDs have dlsym() in libc rather than libdl.
2009-09-14 13:32:18 +03:00
Chris Wilson
12470fd701 [configure] Setup GL CFLAGS before checking for GLX 2009-09-14 10:36:08 +01:00
Chris Wilson
9c2790ccc4 [build] Add a default message for when GLEW isn't built
And it appears I touched the build system again and autoregenerated the
feature headers.
2009-09-14 10:10:45 +01:00
Chris Wilson
6d4f3c40ef Add a private copy of GLEW
This appears to be the simplest mechanism to build libglew at the moment -
should a system copy be unavailable.  Fortunately libglew is now distributed
under a permissive licence.

If you want to pass 'make -C src check' you have to use the system copy,
or spend quite a bit of time cairo-fying libglew.
2009-09-14 09:26:02 +01:00
Chris Wilson
9ad26f74b0 [configure] Fallback to detect OpenGL headers
When not using mesa, we can not rely on a pkgconfig file, so just rely on
the presence of the OpenGL headers instead.
2009-09-13 23:16:57 +01:00
M Joonas Pihlaja
f5bcb2f36e [build] Enable building cairo-trace on Solaris.
Solaris supports LD_PRELOAD too!
2009-09-13 20:30:55 +03:00
M Joonas Pihlaja
ce8c842a70 [trace] Make cairo-trace and its symbol-lookup automatically configured.
The build shouldn't fail if we can't make our optional performance
tools.
2009-09-13 20:30:55 +03:00
Chris Wilson
6cb3ff9c19 [configure] --enable-symbol-lookup
There you go Joonas, I don't always ignore your suggestions! This is
simple patch to allow the user to disable symbol loops in case the
auto-detection fails on some obscure (perhaps OpenBSD) platform. Or in
case the user really wants to trim a few bytes from a library only used
during tracing!
2009-09-13 10:52:14 +01:00
Chris Wilson
34778a883a [configure] Typo in test
The have_dl clause was meant to have been removed from the requirements
test for cairo-script-interpreter. Instead we left the test broken.
2009-09-09 01:16:08 +01:00
Chris Wilson
9389cb78a8 [build] Improve handling of missing test apparatus
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
2009-09-08 17:51:33 +01:00
Chris Wilson
310cebf194 [configure] Add option to disable trace.
Some environments may be broken beyond our capabilities to detect, or
maybe the user is just insane and doesn't want to build my nice shiny
cairo-trace. Whatever, give them the option to choose:

  $ ./configure --disable-trace
2009-09-05 15:21:50 +01:00
Carlos Garcia Campos
687462be89 [build] Fix a typo in configure.ac 2009-08-30 12:07:28 +02:00
Chris Wilson
8078cd194e [boilerplate] Runtime library check
For the purposes of benchmarking it is useful to run cairo-perf against a
different library from the one it was compiled against. In order to do so,
we need to check that the runtime library contains the required entry
points for our targets - which we can check by using dlsym.
2009-08-29 17:07:38 +01:00
Chris Wilson
7447915381 [script] Conditionalise the build
Allow the interpreter to be disabled if we can not satisfy its dependencies.
2009-08-29 17:07:37 +01:00
Vladimir Vukicevic
d7faec024a Add skia backend
Originally written by Vladimir Vukicevic to investigate using Skia for
Mozilla, it provides a nice integration with a rather interesting code
base. By hooking Skia underneath Cairo it allows us to directly compare
code paths... which is interesting.

[updated by Chris Wilson]
2009-08-29 17:07:35 +01:00
Chris Wilson
af6df4af51 [configure] Choose a better name for the 'temporary' egl iterator
The problem is that it remains referenced by egl_NONPKGCONFIG_LIBS and so
must not be subsequently overwritten, so give it an egl_ prefix.
2009-08-29 17:07:35 +01:00
Chris Wilson
425b0e35e2 Add xml surface
A very simple surface that produces a hierarchical DAG in a simple XML
format. It is intended to be used whilst debugging, for example with the
automatic regression finding tools of cairo-sphinx, and with test suites
that just want to verify that their code made a particular Cairo call.
2009-08-29 17:07:34 +01:00
Chris Wilson
6e0b3be903 Add cairo-sphinx utility for regression analysis
sphinx is an alternate version of the current cairo-test-trace. It's
purpose is to replay a live application (which may just be a replay of a
trace) against a backend and its reference. The improvement over the
original cairo-test-trace is that the reference backend may be from an
older version of cairo.
2009-08-29 17:07:34 +01:00
Chris Wilson
cd7b27ff5c Add 'flight-data-recorder' utility.
This is a simple variation on cairo-trace that wraps records the last 16
contexts by wrapping the target surface inside a tee surface, along with a
meta/recording surface. Then on receipt of a SIGUSR1, those last 16
contexts are played via a script-surface into /tmp/fdr.trace.

Mostly proof-of-concept, it seems to be causing a number of rendering
glitches whilst testing with firefox -- otherwise, it seems to works.
2009-08-29 08:08:39 +01:00
Chris Wilson
658cdc7c9a Introduce cairo_tee_surface_t
Add a new surface type that multiplies it input onto several output
surfaces. The only limitation is that it requires a master surface that is
used whenever we need to query surface options, such as font options and
extents.
2009-08-29 08:08:39 +01:00
Chris Wilson
a3f393cf64 [configure] Also check for libiberty.h
cairo-trace also uses the libiberty.h without checking for its presence --
causing a build failure if bfd was installed but not that header.
2009-08-06 10:11:42 +01:00
Chris Wilson
c3f2db4f73 [drm] Add an accelerated image surface.
Use the DRM interface to h/w accelerate composition on image surfaces.
The purpose of the backend is simply to explore what such a hardware
interface might look like and what benefits we might expect.  The
use case that might justify writing such custom backends are embedded
devices running a drm compositor like wayland - which would, for example,
allow one to write applications that seamlessly integrated accelerated,
dynamic, high quality 2D graphics using Cairo with advanced interaction
(e.g. smooth animations in the UI) driven by a clutter framework...

In this first step we introduce the fundamental wrapping of GEM for intel
and radeon chipsets, and, for comparison, gallium. No acceleration, all
we do is use buffer objects (that is use the kernel memory manager) to
allocate images and simply use the fallback mechanism. This provides a
suitable base to start writing chip specific drivers.
2009-07-23 16:18:42 +01:00
Chris Wilson
1ae5942a3a Merge commit 'anholt/gl'
Conflicts:
	boilerplate/Makefile.sources
	boilerplate/cairo-boilerplate.c
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/Makefile.am
2009-07-21 22:28:44 +01:00
Chris Wilson
52fa8760ae Add OpenVG backend.
Based on the work by Øyvind Kolås and Pierre Tardy -- many thanks to
Pierre for pushing this backend for inclusion as well as testing and
reviewing my initial patch. And many more thanks to pippin for writing the
backend in the first place!

Hacked and chopped by myself into a suitable basis for a backend. Quite a
few issues remain open, but would seem to be ready for testing on suitable
hardware.
2009-07-17 11:50:02 +01:00
Carlos Garcia Campos
16387f0a7d [configure] Bump pixman dependency
Version 0.15.16 contains the new PDF blend mode operators.
2009-07-14 11:16:24 +02:00
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
M Joonas Pihlaja
d544828934 [build] Look for libpng.pc as well when configuring.
The OpenBSD png package installs only libpng.pc and not
any of libpng{13,12,10}.pc.
2009-06-20 06:16:51 -06:00
M Joonas Pihlaja
d9b5a98a78 [build] Require fontconfig >= 2.2.95 if we're using it at all.
We require at least fontconfig 2.2.95 when we're using
fontconfig because we depend on the FcResultOutOfMemory
error code introduced in that version.
2009-06-19 19:01:14 +03: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
750c1b5b48 [configure] Check for FcInit() 2009-06-07 19:48:59 +01:00
Chris Wilson
f7a562a590 [configure] Don't attempt to build GTK+ utilities on system without GTK+ 2009-06-07 19:48:59 +01:00
Chris Wilson
60aefd0d63 [configure] Bump pixman dependency.
Reflect was only fixed in the 0.15 series, so require at least that
version of pixman so we can that advantage of that and drop our
workaround.
2009-06-05 07:32:44 +01:00
Eric Anholt
f59f44c140 Merge commit 'origin/master' into gl
Felt like pulling the latest stuff, since I branched back in February.

Conflicts:
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/csi-replay.c
2009-06-02 00:56:39 -07:00
Chris Wilson
87b764908a [gl] Add EGL target
Split the GLX context from the GL surface to enable use of an alternative
EGL interface.
2009-05-20 08:13:45 +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
Eric Anholt
93c437d4b9 [gl] Use GLEW to detect required extension presence. 2009-03-28 21:00:49 -07: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
Eric Anholt
235de8d7a4 [gl] Add basics for GL surface backend using test-fallback as base. 2009-02-05 09:38:43 -08: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
Chris Wilson
6f284587a4 [script] Add examples
Add some simple examples to demonstrate CairoScript, courtesy of M Joonas
Philaja.
2008-12-12 12:00:44 +00:00
Chris Wilson
5591cb58fd [script] Only use zlib if available.
Conditionally link against zlib - replaying a script will fail if the
trace uses a compressed format.
2008-11-26 17:43:22 +00:00