summaryrefslogtreecommitdiff
path: root/src/cairo-mutex-list-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Drop cairo-glEmmanuele Bassi2023-01-271-4/+0
| | | | | | | | | The GL support in Cairo has always been a prototype, and nothing happened in the past 10+ years to make it work as it was meant to. GL support is not enabled by any downstream packagers of Cairo, so nobody should notice its absence.
* Remove cairo-drmEmmanuele Bassi2022-02-251-3/+0
| | | | | The DRM backend has always been a science experiment, but now it hasn't been built in more than 10 years, and it's completely broken.
* win32: Make font dc thread localYongsu Park2020-03-111-0/+1
|
* Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0Søren Sandmann Pedersen2012-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new pixman API allows glyphs to be cached and composited in one go, which reduces overhead compared to individual calls to pixman_image_composite_region32(). Notes: - There is an explicit call to _cairo_image_scaled_glyph_fini(). This could instead be done with a private, but I chose not to do that since we don't need to store any actual data; we only need notification when the glyph dies. - The slowdown in poppler-reseau is real and stable across runs. I'm not too concerned about it because this benchmark is only one run and so it is dominated by glyph cache setup costs and FreeType rasterizing. Performance results, image backend: Speedups firefox-talos-gfx 5571.55 -> 4265.57: 1.31x speedup gnome-terminal-vim 1875.82 -> 1715.14: 1.09x speedup evolution 1128.24 -> 1047.68: 1.08x speedup xfce4-terminal-a1 1364.38 -> 1277.48: 1.07x speedup Slowdowns poppler-reseau 374.42 -> 394.29: 1.05x slowdown Performance results, image16 backend: Speedups firefox-talos-gfx 5387.25 -> 4065.39: 1.33x speedup gnome-terminal-vim 2116.66 -> 1962.79: 1.08x speedup evolution 987.50 -> 924.27: 1.07x speedup xfce4-terminal-a1 1856.85 -> 1748.25: 1.06x speedup gvim 1484.07 -> 1398.75: 1.06x speedup Slowdowns poppler-reseau 371.37 -> 393.99: 1.06x slowdown Also bump pixman requirement to 0.27.1.
* Revert "Use pixman glyphs"Søren Sandmann Pedersen2012-04-301-1/+0
| | | | | | This was pushed accidentally - apologies. This reverts commit 752c3b69e008b7d219da8cc5c657cf995732d3b8.
* Use pixman glyphsSøren Sandmann Pedersen2012-04-301-0/+1
|
* Make error contexts staticAndrea Canciani2011-07-051-1/+0
| | | | | | Dynamically creating error contexts requires locking and failure handling. The code logic can be simplified by statically defining all the possible error contexts.
* win32: Use a font_face hash table to provide unique font facesAdrian Johnson2010-11-161-0/+4
| | | | | | | | | Similar to the freetype and toy font backends, use a hash table to map logfont,hfont to font faces. This fixes the multiple embedding of the same font in PDF. https://bugs.freedesktop.org/show_bug.cgi?id=24849
* cairo: Create error objects for cairo_tChris Wilson2010-06-121-0/+1
| | | | | | | | | | | | Perform an early check for error status and prevent creation of a full object. This means that we do not pass down error objects to the initialisation routines and so can survive without paranoia inside the library. It also has brings consistency that like the other constructors, no object is created in error and we can skip the cairo_destroy() if we choose (and we don't waste one of the precious zero-alloc context slots. Fixes crash in test/a8-mask introduced by 1a544361e845.
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | 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
* xcb: Refresh.Chris Wilson2010-01-221-0/+4
| | | | | | | | | | | | | | | | | | 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.
* image: Implement high level interface.Chris Wilson2010-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write a dedicated compositor for pixman so that we avoid the middle-layer syndrome of surface-fallback. The major upshot of this rewrite is that the image surface is now several times quicker for glyph compositing, which dramatically improves performance for text rendering by firefox and friends. It also uses a couple of the new scan convertors, such as the rectangular scan converter for rectilinear paths. Speedups ======== image-rgba firefox-talos-gfx-0 342050.17 (342155.88 0.02%) -> 69412.44 (69702.90 0.21%): 4.93x speedup ███▉ image-rgba vim-0 97518.13 (97696.23 1.21%) -> 30712.63 (31238.65 0.85%): 3.18x speedup ██▏ image-rgba evolution-0 69927.77 (110261.08 19.84%) -> 24430.05 (25368.85 1.89%): 2.86x speedup █▉ image-rgba poppler-0 41452.61 (41547.03 2.51%) -> 21195.52 (21656.85 1.08%): 1.96x speedup █ image-rgba firefox-planet-gnome-0 217512.61 (217636.80 0.06%) -> 123341.02 (123641.94 0.12%): 1.76x speedup ▊ image-rgba swfdec-youtube-0 41302.71 (41373.60 0.11%) -> 31343.93 (31488.87 0.23%): 1.32x speedup ▍ image-rgba swfdec-giant-steps-0 20699.54 (20739.52 0.10%) -> 17360.19 (17375.51 0.04%): 1.19x speedup ▎ image-rgba gvim-0 167837.47 (168027.68 0.51%) -> 151105.94 (151635.85 0.18%): 1.11x speedup ▏ image-rgba firefox-talos-svg-0 375273.43 (388250.94 1.60%) -> 356846.09 (370370.08 1.86%): 1.05x speedup
* [drm] Add an accelerated image surface.Chris Wilson2009-07-231-0/+3
| | | | | | | | | | | | | | | | | 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.
* Merge commit 'anholt/gl'Chris Wilson2009-07-211-0/+4
|\ | | | | | | | | | | | | | | | | Conflicts: boilerplate/Makefile.sources boilerplate/cairo-boilerplate.c build/configure.ac.features src/cairo.h util/cairo-script/Makefile.am
| * [gl] Add basics for GL surface backend using test-fallback as base.Eric Anholt2009-02-051-0/+4
| |
* | [pattern] Generalise the freed pattern poolChris Wilson2009-06-051-1/+0
|/ | | | | | Also cache recently freed surface and gradient patterns. With thanks to Jonathan Morton for the inspiration and initial pointer pool code for pixman.
* [scaled-font] Global glyph cacheChris Wilson2009-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | Currently glyphs are cached independently in each font i.e. each font maintains a cache of up to 256 glyphs, and there can be as many scaled fonts in use as the application needs and references (we maintain a holdover cache of 512 scaled fonts as well). Alternatively, as in this patch, we can maintain a global pool of glyphs split between all open fonts. This allows a heavily used individual font to cache more glyphs than we could allow if we used per-font glyph caches, but at the same time maintains fairness across all fonts (by using random replacement) and provides a cap on the maximum number of global glyphs. The glyphs are allocated in pages, which are cached in the global pool. Using pages means we can exploit spatial locality within the font (nearby indices are typically used in clusters) to reduce frequency of small allocations and allow the scaled font to reserve a single MRU page of glyphs. This caching dramatically reduces the cairo overhead during the cairo-perf benchmarks, and drastically reduces the number of allocations made by the application (for example browsing multi-lingual site with firefox).
* [toy-font-face] Move toy font face code in a file of its ownBehdad Esfahbod2008-12-201-1/+1
|
* [mime-data] Allow embedding of arbitrary mime-types.Chris Wilson2008-11-031-0/+1
| | | | | | | | | | 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.
* Make sure feature macros are checked using #if, not #ifdef; add a test for itBehdad Esfahbod2008-09-201-1/+1
| | | | | This is more robust to cases where people want to assign 0 to those variables. (win32/alternate build systems, etc)
* [src/Makefile.am.analysis] Check that all headers can be compiled standaloneBehdad Esfahbod2008-09-191-0/+5
| | | | | This ensures that each header includes all headers it depends on. This is now enforced by "make check".
* [cairo-mutex] Move semicolons out of cairo-mutex-list-private.hBehdad Esfahbod2008-09-191-9/+8
| | | | | | | | Previously cairo-mutex-list-private.h assumed that every use of the file will produce a statement for each mutex by including a semicolon after each. But some uses (like enumerating all static mutexes in an array for example, can't be implemented with the semicolon in place. So, move the semicolon out to the users of the header file.
* Cleanup configure.in macrosBehdad Esfahbod2008-09-041-1/+1
|
* [cairo-scaled-font] Create error objects on demand.Chris Wilson2008-02-151-0/+1
| | | | | | | | | | 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.
* [cairo-atomic] Declare the mutex for NEEDS_MEMORY_BARRIER.Chris Wilson2007-11-051-1/+1
| | | | | | Whilst NEED_MEMORY_BARRIER should be a subset of ! HAS_ATOMIC_OPS, until we have accurate configure tests NEED_MEMORY_BARRIER may be invoked independently.
* [cairo-atomic] Introduce atomic ops.Chris Wilson2007-09-251-0/+3
| | | | | | | | | | Test for the availability of the Intel __sync_* atomic primitives and use them to define a few operations useful for reference counting - providing a generic interface that may be targeted at more architectures in the future. If no atomic primitives are available, use a mutex based variant. If the contention on that mutex is too high, we can consider using an array of mutexes using the address of the atomic variable as the hash.
* [cairo-pattern] Cache surface for solid patternsChris Wilson2007-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original work by Jorn Baayen <jorn@openedhand.com>, 2715f2098127d04d2f9e304580a26cd0842c0e64 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. A cached surface can only be reused if it is similar to the destination. In order to check for similar surfaces a new test is introduced for the backends to determine that the cached surface is as would be returned by a _create_similar() call for the destination and content. As surfaces are in general complex encapsulation of graphics state we only return unshared cached surfaces and reset them (to clear any error conditions and graphics state). In practice this makes little difference to the efficacy of the cache during various benchmarks. However, in order to transparently share solid surfaces it would be possible to implement a COW scheme. Cache hit rates: (hit same index + hit in cache) / lookups cairo-perf: (42346 + 28480) / 159600 = 44.38% gtk-theme-torturer: (3023 + 3502) / 6528 = 99.95% gtk-perf: (8270 + 3190) / 21504 = 53.29% This translates into a reduction of about 25% of the XRENDER traffic during cairo-perf.
* [cairo-xlib] Split per-display attributes from per-screen.Chris Wilson2007-05-041-1/+1
| | | | | | | 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.
* [cairo-mutex] Err on unintended inclusion of cairo-mutex-list-private.hBehdad Esfahbod2007-04-191-0/+3
|
* [cairo-mutex] Remove multiple-inclusion guards from cairo-mutex-list-private.hBehdad Esfahbod2007-04-191-3/+0
| | | | | This is a list header file. We should not prevent it from multiple inclusions.
* Rename cairo-mutex-list.h to cairo-mutex-list-private.hCarl Worth2007-04-121-0/+50
Also add it (and cairo-mutex-private.h) to Makefile.am where they should have been.