Commit graph

240 commits

Author SHA1 Message Date
Chris Wilson
0870c6fb5b gcc-4.5 warnings and optimisation flags. 2010-05-12 20:54:49 +01:00
Chris Wilson
cf0933a05a gallium: Refresh.
Catch up with changes in APIs, still no substance and the integration
with winsys handles needs review.
2010-05-12 20:54:49 +01:00
Chris Wilson
bd672d080c drm: code dump, sorry.
Lots upon lots of tiny fixes mixed in with experimental code. :(
2010-05-12 20:54:49 +01:00
Andrea Canciani
248af38b3e atomic: Add MacOSX atomic implementation
Enable atomic operation on MacOS X, using the functions provided by
libkern/OSAtomic.h

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-29 10:52:48 +02:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Chris Wilson
c1e51a0264 build: Spelling correction 2010-04-23 14:39:21 +01:00
Chris Wilson
4351304b51 Win32 features update. 2010-04-14 19:31:35 +01:00
Chris Wilson
d209b40c64 xlib: Rearrange xrender stubs to restore compilation without xrender.h 2010-04-01 20:36:15 +01:00
Chris Wilson
b101c7dab8 gl: Add EGL interface
Enable the EGL backend for GL.
2010-03-11 01:49:18 +00:00
Chris Wilson
22b5f78c1c gl: Remove eagle support
Eagle is no more, Kristian has superseded it with true EGL support. He
is so happy...
2010-02-11 10:38:51 +00:00
Benjamin Otte
ed4a30b383 build: Add -Wdeclaration-after-statement
... and fix the compile errors from it I get on my build.

It's Cairo style to put declarations before the code, so better warn
about it.
Besides, it eases porting to old compilers like MSVC.
2010-02-10 22:13:33 +01:00
Benjamin Otte
58980b4ad6 build: Remove glitz surface
glitz is unmaintained and the GL surface is far superior anyway.
2010-01-27 09:56:14 +01:00
Chris Wilson
123bdb086a xcb: Make shm optional
Trying to build xcb on a system without SHM wrapped by xcb. The right
answer would be to build libxcb-shm. The quick answer is to compile out
shm support.
2010-01-25 16:45:03 +00:00
Chris Wilson
1236c41072 xcb: Refresh.
Still an experimental backend, it's now a little too late to stabilise
for 1.10, but this should represent a major step forward in its feature
set and an attempt to catch up with all the bug fixes that have been
performed on xlib. Notably not tested yet (and expected to be broken)
are mixed-endian connections and low bitdepth servers (the dithering
support has not been copied over for instance). However, it seems robust
enough for daily use...

Of particular note in this update is that the xcb surface is now capable
of subverting the xlib surface through the ./configure --enable-xlib-xcb
option. This replaces the xlib surface with a proxy that forwards all
operations to an equivalent xcb surface whilst preserving the cairo-xlib
API that is required for compatibility with the existing applications,
for instance GTK+ and Mozilla. Also you can experiment with enabling a
DRM bypass, though you need to be extremely foolhardy to do so.
2010-01-22 23:01:52 +00:00
Chris Wilson
9b42b6156d build: Add -pthread to real_pthread_CFLAGS 2009-11-02 12:50: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
M Joonas Pihlaja
d5609ca04e [build] Check compiler flags using AC_TRY_LINK instead of AC_TRY_COMPILE.
Turns out we were passing suncc warning suppression flags to gcc
by mistake since -e<entry point> is actually a valid option for
gcc.  This caused the -erroff=E_ENUM_TYPE_MISMATCH_ARG and other
-erroff options to be passed to the linker.  In the normal case
of a GNU ld linker this doesn't matter since it ignores bogus
entry points, but the GNU gold linker replaces a bogus entry
point with NULL.  This patch makes the CAIRO_CC_TRY_FLAG()
check stricter by testing that the flag doesn't interfere with
linking executables.
2009-10-15 17:47:33 +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
Chris Wilson
ef9286751d [atomic] Fallback to libatomic-ops-dev
Use libatomic-ops-dev in preference to mutex-based atomics, if we do not
have the builtin atomic intrinsics available.
2009-10-15 13:05:46 +01:00
Sebastian Dröge
56c9b2de7a Use __uint128_t and __int128_t if available
GCC uses a peculiar name for a real 128-bit integer on x86-64.

Speedups, xlib on a gm45
========================
poppler        41246.56 -> 35102.82: 1.18x speedup
swfdec-youtube 12623.01 -> 11936.79: 1.06x speedup

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-15 18:19: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
M Joonas Pihlaja
71c3b2888c [win32] Sync Makefile.win32.features.
Ooops.. wasn't sure if I should commit this or not.
2009-09-13 20:33:42 +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
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
M Joonas Pihlaja
f5df38ca5e [build] Fix typos in prototype warnings.
The -Wstrict-prototypes and -Wmissing-prototypes warnings
weren't actually in use due to typos.
2009-09-02 06:40:35 +03:00
M Joonas Pihlaja
c086b40a93 [build] Hush the Solaris compiler about enum abuse.
Sun Studio 12 doesn't like it when we mix our
enum values and types.  We do that a lot on purpose
so the warnings from compiles were very verbose.
2009-09-02 06:38:15 +03:00
M Joonas Pihlaja
f081a5ff55 [build] Refine the -Wno-attribute test to check our use cases.
We don't actually check that -Wno-attribute does what
we think it does.  On clang it doesn't since it happily
seems to recognize but ignore the attribute.

This patch factors out a silent version of CAIRO_CC_TRY_FLAG
which accepts an optional program argument and actually tests
that the compiler doesn't produce any warning messages.  It
is then used to check that -Wno-attribute doesn't complain
when the __warn_unused_result__ attribute is applied to
void functions or variables.
2009-09-02 06:35:14 +03:00
M Joonas Pihlaja
b509b548b1 [trace] Check for __builtin_return_address explicitly.
Some other compilers such as clang and icc support the
__builtin_return_address() intrinsic as well, so we don't
need to check for __GNUC__ >= 3 only.
2009-09-02 04:50:21 +01:00
M Joonas Pihlaja
b5cf24a4fb [build] Remove duplicate invocation of AC_CHECK_HEADERS.
The fenv.h stuff was checked twice.
2009-08-31 16:06:31 +03: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
f99e184144 [build] Remove -Wcast-align
Use -Wcast-align simply generates too much noise due to false-positive
reports when casting pixels to uint32_t.
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
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
eba6b5126a [build] Add options for warning about bad casts
-Wbad-function-cast in particular. Triggers quite a few warnings where we
have explicitly cast to an integer.
2009-08-29 08:08:38 +01:00
Behdad Esfahbod
90536ef2dd [build] Remove bogus warning that we require at least one native font backend
That limitation was lifted long ago after twin face was introduced.
2009-08-25 00:28:08 -04:00
Behdad Esfahbod
20e227fc39 [build] Fix typo 2009-08-24 23:57:21 -04:00
Chris Wilson
920f59a755 [build] Configure switch to disable atomics
Workaround for my arm toolchain which succeeds in linking the configure
program, only to complain when linking a program (such as cairo-perf)
against libcairo.so. Annoying.
2009-08-06 10:16:33 +01:00
Chris Wilson
51bd27afa1 [boilerplate/test] Convert make-*-constructors to shell
Remove the intermediate C program that was a nuisance whilst
cross-compiling and replace it with a simple shell script that is just a
combination of cat + sed.
2009-08-06 10:11:32 +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
2dd97ae59c [perf] Include trace comparison in html output 2009-07-20 22:20:01 +01:00
Chris Wilson
ebac096648 [build] And export CC_FOR_BUILD so that we can actually use it! 2009-07-20 19:54:40 +01:00
Chris Wilson
ed7853d499 [build] Use ${CC} as the default value for CC_FOR_BUILD 2009-07-20 19:38:34 +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
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