cairo/util
Chris Wilson f617d5fc98 Add cairo_device_t
The device is a generic method for accessing the underlying interface
with the native graphics subsystem, typically the X connection or
perhaps the GL context. By exposing a cairo_device_t on a surface and
its various methods we enable finer control over interoperability with
external interactions of the device by applications. The use case in
mind is, for example, a multi-threaded gstreamer which needs to serialise
its own direct access to the device along with Cairo's across many
threads.

Secondly, the cairo_device_t is a unifying API for the mismash of
backend specific methods for controlling creation of surfaces with
explicit devices and a convenient hook for debugging and introspection.

The principal components of the API are the memory management of:

  cairo_device_reference(),
  cairo_device_finish() and
  cairo_device_destroy();

along with a pair of routines for serialising interaction:

  cairo_device_acquire() and
  cairo_device_release()

and a method to flush any outstanding accesses:

  cairo_device_flush().

The device for a particular surface may be retrieved using:

  cairo_surface_get_device().

The device returned is owned by the surface.
2010-01-22 23:01:50 +00:00
..
cairo-fdr [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t. 2009-10-22 02:29:47 +03:00
cairo-script script: Handle cache allocation failure more gracefully 2010-01-22 23:01:49 +00:00
cairo-sphinx perf: Enable a surface cache for perf-trace 2010-01-22 23:01:46 +00:00
cairo-trace Add cairo_device_t 2010-01-22 23:01:50 +00:00
.gitignore gitignore: refresh 2010-01-22 22:30:43 +00:00
backtrace-symbols.c [util/backtrace-symbols] Implement backtrace_symbols_fd() 2008-05-27 04:45:37 -04:00
cairo-api-update Remove #ifdef munging since we once again support either #if or #ifdef. 2005-05-17 09:13:02 +00:00
cairo-view [util] Fix pangram 2008-12-24 22:29:59 -05:00
cairo.modules [build] Add a default message for when GLEW isn't built 2009-09-14 10:10:45 +01:00
COPYING Add a COPYING file to each aux. source directory 2008-10-31 16:14:14 +00:00
font-view.c [util] Add font-view 2009-06-02 18:16:48 +01:00
Makefile.am [build] Improve handling of missing test apparatus 2009-09-08 17:51:33 +01:00
malloc-stats.c [utils] Remove unused code 2009-08-10 12:47:37 -04:00
README Fix various README typos 2009-01-02 02:56:38 -05:00
show-edges.c [util] Show total edge length in show-edges 2009-08-29 08:08:31 +01:00
show-events.c Eliminate self-intersecting strokes. 2009-08-29 08:08:28 +01:00
show-traps.c Eliminate self-intersecting strokes. 2009-08-29 08:08:28 +01:00
trace-to-xml.c [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t. 2009-10-22 02:29:47 +03:00
waterfall [util] Add waterfall 2008-12-26 16:38:26 -05:00
xml-to-trace.c Add xml surface 2009-08-29 17:07:34 +01:00
xr2cairo Fixed to not munge some internal cairot names, (such as cairo_traps_*) 2003-07-26 20:38:58 +00:00

Cairo Utilities
===============

There are a varieties of utilities we use with cairo.


backtrace-symbols
-----------------

This is a small shared library designed to be preloaded by the
linker and its purpose is to make the backtrace_symbols() function
of glibc produce more useful source reference information.

Build by:

	make backtrace-symbols.so

and use by:

	LD_PRELOAD=$PWD/backtrace-symbols.so app-to-run

This code should be contributed back to glibc at some point.


malloc-stats
------------

This is a small shared library designed to be preloaded by the
linker and its purpose is to make the malloc_stats() function
of glibc produce more useful information.

Build by:

	make malloc-stats.so

and use by:

	LD_PRELOAD=$PWD/malloc-stats.so app-to-run

This works best when backtrace-symbols is in use.  That is:

	LD_PRELOAD="$PWD/backtrace-symbols.so $PWD/malloc-stats.so" app-to-run


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.


cairo-api-update and xr2cairo
-----------------------------

These two scripts were used to convert source code written for pre-1.0
cairo to newer API.  See $(top_srcdir)/PORTING_GUIDE for more information.

These files are obsolete now and may be removed in a future version.


cairo-view and waterfall
------------------------

These are two pycairo scripts useful for testing the toy font backend.