summaryrefslogtreecommitdiff
path: root/src/cairo-debug.c
AgeCommit message (Collapse)AuthorFilesLines
2008-12-26[scaled-font] Make cairo_debug_reset_static_data() work againBehdad Esfahbod1-0/+2
I broke it in a5983929f8f07f384f78e0b604e22037cf5ed716
2008-12-20[toy-font-face] Move toy font face code in a file of its ownBehdad Esfahbod1-1/+1
2008-11-03[mime-data] Allow embedding of arbitrary mime-types.Chris Wilson1-0/+2
Use the surface user-data array allow to store an arbitrary set of alternate image representations keyed by an interned string (which ensures that it has a unique key in the user-visible namespace). Update the API to mirror that of cairo_surface_set_user_data() [i.e. return a status indicator] and switch internal users of the mime-data to the public functions.
2008-06-22Rename _cairo_font_reset_static_data to _cairo_font_face_reset_static_dataBehdad Esfahbod1-3/+3
2008-02-15[cairo-scaled-font] Create error objects on demand.Chris Wilson1-0/+2
In order to correctly report the error back to the user during the creation of a scaled font, we need to support a nil object per error. Instead of statically allocating all possible errors, lazily allocate the nil object the first time we need to report a particular error. This fixes the misreporting of an INVALID_MATRIX or NULL_POINTER that are common user errors during the construction of a scaled font.
2008-01-28[doc] Make sure all function names in docs are followed by ()Behdad Esfahbod1-2/+2
2007-10-04[cairo-debug] Finalize mutexes along with other static data.Chris Wilson1-0/+4
Initialize (so repeated calls of cairo_debug_reset_static_data() is safe) and finalize the mutexes with the reset of the static data.
2007-05-04[cairo-xlib] Split per-display attributes from per-screen.Chris Wilson1-4/+0
Previously, we stored the per-display attributes inside a special screen=NULL _cairo_xlib_screen_info_t. Now we keep track of known X displays and store the screen information beneath the display structure alongside the per-display hooks.
2007-03-20Cache solid patternsChris Wilson1-0/+2
We use a small cache of size 16 for patterns created from solid colors, e.g. cairo_set_source_rgb(). This helps with toolkits that draw many widgets using the same colour scheme. The cache uses a static index variable, which itself acts like a cache of size 1, remembering the most recently used colour. So repeated lookups for the same colour hit immediately. If that fails, the cache is searched linearly, and if that fails too, a new pattern is created and a random member of the cache is evicted.
2007-02-28Revert the solid-pattern cacheBehdad Esfahbod1-2/+0
This reverts the following commits: 2715f2098127d04d2f9e304580a26cd0842c0e64 67e3b3c53bdd69e4d3503eed2db66953f1ac038c See this thread for an analysis of the problems it caused: http://lists.freedesktop.org/archives/cairo/2007-February/009825.html In short, a single cache for all backends doesn't work, as one thread using any backend can cause an unused xlib pattern to be evicted from the cache, and trigger an xlib call while the display is being used from another thread. Xlib is not prepared for this.
2007-02-14[cairo-pattern] Cache surface for solid patternsJorn Baayen1-0/+2
We use a small cache of size 16 for surfaces created for solid patterns. This mainly helps with the X backends where we don't have to create a pattern for every operation, so we save a lot on X traffic. Xft uses a similar cache, so cairo's text rendering traffic with the xlib backend now completely matches that of Xft. The cache uses an static index variable, which itself acts like a cache of size 1, remembering the most recently used solid pattern. So repeated lookups for the same pattern hit immediately. If that fails, the cache is searched linearly, and if that fails too, a new surface is created and a random member of the cache is evicted. Only surfaces that are "compatible" are used. The definition of compatible is backend specific. For the xlib backend, it means that the two surfaces are allocated on the same display. Implementations for compatibility are provided for all backends that it makes sense.
2006-06-06Remove initial, final, and duplicate blank lines.Carl Worth1-1/+0
This patch was produced by running git-stripspace on all *.[ch] files within cairo. Note that this script would have also created all the changes from the previous commits to remove trailing whitespace.
2006-06-06Remove trailing whitespace from lines that look like comments.Carl Worth1-1/+1
This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//' run on all *.[ch] files within cairo, (though I manually excluded src/cairo-atsui-font.c which has a code line that appears as a comment to this script).
2005-08-31Split out scaled font code to cairo-scaled-font.cKeith Packard1-1/+0
Replace cairo cache implementation (this code from cworth) No more global glyph cache to clean up Store glyphs in new per-scaled font caches which hold user-space metrics and device space bounding boxes Refactor glyph drawing APIs so that the surface API is invoked directly from the gstate code. Add path creation/destruction routines (to hold glyph paths) New implementation of scaled fonts which uses per-scaled_font caches for glyphs and keeps user-space metrics, device-space bboxes along with glyph images and/or glyph paths. Adapt to new scaled font API changes. New cache and scaled_font APIs Repond to bug fix in metrics computation for glyphs where y values were rounded up instead of down because of a sign difference between cairo and FreeType. Reviewed by: otaylor, cworth
2005-08-01New public header file.Carl Worth1-0/+73
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.