summaryrefslogtreecommitdiff
path: root/src/cairo-freed-pool-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix data race in freed_poolWan-Teh Chang2016-03-051-5/+5
| | | | | | | | | | | This adds _cairo_atomic_int_get_relaxed and _cairo_atomic_int_set_relaxed which are meant to have a behaviour of relaxed read/writes in C11's memory model. This patch also uses these new function to fix a data race with freed_pool_t's |top| data member. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90318 Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
* Introduce a new compositor architectureChris Wilson2011-09-121-2/+4
| | | | | | | | | | | | | | | | | | Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)
* skia: Update to use cairo_backend_t interfaceChris Wilson2011-08-131-0/+4
| | | | | | | | | | | | | Still hopelessly broken. Requires compiling cairo to use static linking and then still requires manual linkage to workaround libtool. Lots of functionality is still absent - we need to either find analogues to some Cairo operations or implement fallbacks - but it is sufficient to investigate how Skia functions in direct comparison with Cairo for tessellation/rasterisation. Caveat emptor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* freed-pool: Enlarge the freed cacheChris Wilson2011-07-241-1/+1
| | | | | | | Clips end up recursing more than 4 levels and so we need a larger stash to avoid mallocs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Remove conditional compilation of freed-poolsAndrea Canciani2011-07-051-1/+5
| | | | | | | | | | | Conditional compilation was needed to avoid warnings: cairo-clip.c:51: warning: ‘clip_path_pool’ defined but not used cairo.c:181: warning: ‘context_pool’ defined but not used They can be avoided by making sure that _freed_pool_reset(ptr) actually consumes its argument. This has the pleasant side-effect that forgetting to properly reset a freed-pool now results in a warning if atomic ops are disabled/not available.
* freed-pool: Don't access beyond the end of the array.Chris Wilson2010-05-201-3/+5
| | | | | | Argh. This bug has been here for quite some time and only showed itself with a corrupt pointer on ppc32. Since the erroneous write is inside the block, it remained undetected by valgrind.
* atomic: Correct implementation of _atomic_fetch ()Andrea Canciani2010-04-291-1/+7
| | | | | | | | | _atomic_fetch() was expected to replace the content of a slot with NULL and return the old content, but it incorrectly returned the previous content even if it was unable to perform the exchange (because of conflicts with other threads accessing the pool). Fix suggested by Chris Wilson <chris@chris-wilson.co.uk>
* atomic: Separate bool and old-value compare-and-exchangeAndrea Canciani2010-04-291-2/+2
| | | | | | | | | | | | | Some implementations only offer one version of compare-and-exchange, thus we expose both through cairo-atomic, implementing what is missing through appropriate fallbacks. *_cmpxchg() now return a boolean (this unbreaks _cairo_atomic_uint_cmpxchg) *_cmpxchg_return_old() return the old value Code is updated everywhere to reflect this, by using *_cmpxchg() wherever the returned value was only tested to check if the exchange had really taken place. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* 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
* Unify the two freed object poolsChris Wilson2010-01-221-0/+121
Discard some duplicate code and shared a single freed object pointer pool between the pattern and clip.