summaryrefslogtreecommitdiff
path: root/src/cairo-freelist.c
Commit message (Collapse)AuthorAgeFilesLines
* Use _cairo_malloc instead of mallocAdrian Johnson2018-05-071-2/+2
| | | | | | | | | | _cairo_malloc(0) always returns NULL, but has not been used consistently. This patch replaces many calls to malloc() with _cairo_malloc(). Fixes: fdo# 101547 CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Avoid indiscriminate use of VALGRIND_MAKE_MEM_NOACCESS.John Lindgren2015-06-261-4/+4
| | | | | | | | | Marking stack-allocated objects as no-access creates false positives, which distract from finding real memory errors. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52548 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* drm: code dump, sorry.Chris Wilson2010-05-121-5/+2
| | | | Lots upon lots of tiny fixes mixed in with experimental code. :(
* spans: Add a Bentley-Ottmann variant on the Tor scan converterChris Wilson2010-01-221-9/+29
| | | | | | | | | | | | | | | | | | | | This variant uses the Bentley-Ottmann algorithm to only maintain the active edge list upon edge events and so can efficiently skip areas where no change occurs. This means that it can be much quicker than the Tor algorithm (which is still used to compute the coverages from the active edges) for geometries consisting of long straight lines with few intersections. However due to the computational overhead of the Bentley-Ottmann event processing, for dense curvy paths, simply updating the active edge list in sync with computing the coverages is a win. Due to advantageous adaptive step size, the scan converter can be run at a much higher subsampling with little extra overhead compared with Tor, currently it uses a 256x256 subsampling grid to avoid any impedance mismatch with path precision. Given the current status of implementations, this scan converter [botor] is likely to be advantage where detecting large regions of unchanged span data will result in improved performance, for instance the drm backends which convert the scan data into rectangles.
* Move _cairo_error() to a standalone headerChris Wilson2010-01-221-0/+1
| | | | | A pending commit will want to include some utility code from cairo and so we need to extricate the error handling from the PLT symbol hiding.
* [xcb] Deferred error checking.Chris Wilson2009-09-301-0/+33
| | | | | | | | | XCB avoids the dreaded abort on XError mechanism by forcing the client to perform deferred error checking. So do so. This allows us to combine the fire-and-forget rendering model with accurate error checking, without killing the client or mixing our errors with theirs. XCB for the win!
* Revert "[freelist] Make _cairo_freepool_alloc_from_new_pool static inline."Chris Wilson2009-09-011-0/+29
| | | | | This reverts commit 5a3fa29b370816acb3a08d60e4031ed82c1e4c73 as it breaks the boilerplate when linking with gcc.
* [freelist] Make _cairo_freepool_alloc_from_new_pool static inline.M Joonas Pihlaja2009-09-011-29/+0
| | | | | | | | | | | | | The xlib boilerplate includes a cairo private header to be able to disable usage of the render extension. This indirectly includes cairo-freelist-private.h which contains a bunch of static inline functions which use the private _cairo_freepool_alloc_from_new_pool function, but since that is not inline also, it causes an undefined extern which cannot be resolved. The binutils linker doesn't care since the freelist function aren't actually used in the boilerplate but the Solaris linker does. By making the .._alloc_from_new_pool function inline no dangling references are created and linking succeeds.
* [freelist] Lazy initialisation of poolsChris Wilson2009-08-291-47/+28
|
* [tessellator] Use a priority queue for the eventsChris Wilson2009-08-291-3/+5
| | | | | The skip list was suffering from severe overhead, so though the search was quick, the extra copies during insertion and deletion were slow.
* [drm] Add an accelerated image surface.Chris Wilson2009-07-231-0/+73
| | | | | | | | | | | | | | | | | 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.
* valgrindify init/fini routinesChris Wilson2009-06-041-7/+0
| | | | | Annotate object init/fini routines to detect use-after-free for on-stack/embedded objects.
* [freelist] valgrindify freed blocksChris Wilson2009-06-041-4/+22
| | | | | Mark freed blocks as unaccessible upon free() and then as undefined on alloc().
* [src] Make sure all source files #include "cairoint.h" as their first includeBehdad Esfahbod2007-04-031-2/+3
| | | | | | | | | | | | | | | | | | This is necessary to avoid many portability problems as cairoint.h includes config.h. Without a test, we will regress again, hence add it. The inclusion idiom for cairo now is: #include "cairoint.h" #include "cairo-something.h" #include "cairo-anotherthing-private.h" #include <some-library.h> #include <other-library/other-file.h> Moreover, some standard headers files are included from cairoint.h and need not be included again.
* perf: new-tessellator: Deferred trapezoid generation (first try)Joonas Pihlaja2006-11-221-0/+72