summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* xlib: Remove queued event from _XReadEventsHenry (Yu) Song2015-03-051-0/+5
| | | | | | Following patch fixes a memory leak in xlib surface. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* headers: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-051-2/+2
| | | | also for cairo-xcb-private.h
* headers: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-053-3/+3
|
* perf: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-051-1/+1
|
* perf/micro: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-054-4/+4
|
* test: fix include order for AIX, bug#89354Michael Haubenwallner2015-03-0541-49/+52
|
* define _GETDELIM for getline() on AIXMichael Haubenwallner2015-03-051-0/+2
| | | | | | | | | On AIX 6.1, getdelim() and getline() are not provided by default, causing a gcc compilation error. With _GETDELIM defined, AIX's stdio.h header provides definitions for these routines. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89356 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* skip MAP_NORESERVE when unsupportedMichael Haubenwallner2015-03-052-0/+8
| | | | | | | Fixes a compilation on AIX ('MAP_NORESERVE' undeclared) Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89340 Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* fix conflicting types for 'sync' on AIX, bug#89338Michael Haubenwallner2015-03-052-8/+8
|
* quartz: Remove call to obsolete CGFontGetGlyphPathAndrea Canciani2015-02-051-6/+4
| | | | | | | | | | CGFontGetGlyphPath was not public and is not available anymore on modern OSX/iOS systems. The same functionality is available through the CoreText API since OSX 10.5. Based on a patch by Simon Cozens. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84324
* win32: Fix crash from win32 surface's image size too smallMassimo Valentini2015-02-021-4/+4
| | | | | | | | | | | | Beginning in 1.12, a crash can occur when the win32 surface's image size does not cover the entire surface (e.g. due to clipping regions). This patch enlarges the fallback surface created of the amount necessary not to write past the end of the DIB. It assumes that Clip applied to an HDC are clamped to (0,0,width,height) of the HDC. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53121 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* cairo-trace: Fix duplicated surface push on similar-imageEmanuele Aina2015-01-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | The current code results in trace lines with the source surface being pushed on the stack two times instead of one: s1 s1 //ARGB32 48 48 similar-image % s2 Instead of: s1 //ARGB32 48 48 similar-image % s2 This greatly confuses later commands when the script was replayed, causing traces for trivial GTK3 programs to be unplayable, usually yielding the following error: "invalid value (typically too big) for the size of the input (surface, pattern, etc.)" Drop the duplicated entry from the trace line printed by the cairo_surface_create_similar_image() override. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73580 Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
* xlib-xcb: Don't be lazy and use the real xcb_screen_tUli Schlachter2015-01-171-15/+18
| | | | Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Query the display's subpixel order via RENDERUli Schlachter2015-01-174-29/+43
| | | | | | | | | | | | | | | | | With commit e691d242, the xcb backend started parsing the resources, just like cairo-xlib does. One behavior from cairo-xlib was missing: If no Xft.rgba property was specified, cairo-xlib defaults to the screen's subpixel order. This commit brings that last bit of functionality to cairo-xcb (but currently disabled due to commit e0c0a673). This commits adds a new array to cairo_xcb_connection_t that contains the subpixel order for each screen. There is also a new member in cairo_xcb_screen_t which contains the subpixel order of that screen and which is initialized from the array when the screen is constructed. With this in place, the resource-parsing code can just pick the subpixel order from the screen if needed. Signed-off-by: Uli Schlachter <psychon@znc.in>
* font: Actually perform destruction of fontsAndrea Canciani2015-01-031-2/+3
| | | | | | | | | | | | Commit 337ab1f8d9e29086bfb4001508b28835b41c6390 introduced delayed font destruction to overcome a race, but prevented the correct cleanup of the font cache. This caused fonts to stay in the cache and caused a crash in the api-special-cases (when running the test suite with -f). Fixes api-special-cases, https://bugs.freedesktop.org/show_bug.cgi?id=87567
* xlib: Bump reference count for recording surface replaysChris Wilson2014-12-311-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snapshot takes a reference to the target recording surface in order to enable it for use by multiple treads. In order to balance this, the other two sources of recording surface must also take a reference and for us to release that reference after the replay. Otherwise, we end up with a memory leak: ==1== 1,392 bytes in 3 blocks are definitely lost in loss record 1 of 7 ==1== at 0x4A06BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==1== by 0x4C7042D: _cairo_recording_surface_snapshot (cairo/src/cairo-recording-surface.c:1427) ==1== by 0x4C842BE: _cairo_surface_snapshot_copy_on_write (cairo/src/cairo-surface-snapshot.c:189) ==1== by 0x4C7E7E0: _cairo_surface_detach_snapshot (cairo/src/cairo-surface.c:348) ==1== by 0x4C7E55B: _cairo_surface_detach_snapshots (cairo/src/cairo-surface.c:333) ==1== by 0x4C7E55B: _cairo_surface_flush (cairo/src/cairo-surface.c:1545) ==1== by 0x4C7E6CC: _cairo_surface_finish_snapshots (cairo/src/cairo-surface.c:1017) ==1== by 0x4C7E6CC: cairo_surface_destroy (cairo/src/cairo-surface.c:961) ==1== by 0x4C625A7: cairo_pattern_destroy (cairo/src/cairo-pattern.c:1131) ==1== by 0x4C3FAC6: _cairo_gstate_fini (cairo/src/cairo-gstate.c:225) ==1== by 0x4C3C68C: _cairo_default_context_fini (cairo/src/cairo-default-context.c:75) ==1== by 0x4C3C708: _cairo_default_context_destroy (cairo/src/cairo-default-context.c:93) ==1== by 0x43E576: record_get (cairo/test/record-extend.c:158) ==1== by 0x43E576: record_replay (cairo/test/record-extend.c:173) ==1== by 0x40E22D: cairo_test_for_target (cairo/test/cairo-test.c:929) ==1== by 0x40E22D: _cairo_test_context_run_for_target (cairo/test/cairo-test.c:1532) ==1== by 0x40B6C0: _cairo_test_runner_draw (cairo/test/cairo-test-runner.c:255) ==1== by 0x40B6C0: main (cairo/test/cairo-test-runner.c:937) Reported-by: Massimo Valentini <mvalentini@src.gnome.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87898 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* test: Free test listAndrea Canciani2014-12-061-0/+1
| | | | | | | | | | | | | | | | When running the cairo-test-suite, valgrind reports each of the registered test as a leak, because they are _list_prepend()'ed, but the tests list is never _list_free()'d. Fixes the following valgrind error: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) cairo_boilerplate_xmalloc (cairo-boilerplate-system.c:47) cairo_test_register (cairo-test-runner.c:131) _cairo_test_runner_register_tests (cairo-test-constructors.c:1112) main (cairo-test-runner.c:714) Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* test: Release owned patternAndrea Canciani2014-12-061-1/+3
| | | | | | | | | | | | | | | | | The pattern created by cairo_pattern_create_rgb() is owned by the caller, hence it needs to be released. Fixes the following valgrind error: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) _cairo_pattern_create_solid (cairo-pattern.c:605) _cairo_pattern_create_in_error (cairo-pattern.c:628) cairo_pop_group (cairo.c:552) test_cairo_push_group (api-special-cases.c:157) preamble (api-special-cases.c:1766) main (cairo-test-runner.c:228) Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* tor-scan-converter: Correctly align 64bit typesUli Schlachter2014-12-061-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 32bit SPARC the scan converter was causing a SIGBUS due to an unaligned memory access while accessing an int64_t. This memory accessing was to struct quorem's rem member. This crash occurred because the tor-scan-converter contains its own implementation of a memory pool. This implementation only guarantees an alignment of sizeof(void *), which is less than what a 64 bit type requires on 32bit platforms. This 4 byte alignment is guaranteed, because struct _pool_chunk (which is the struct that is used for managing free space) contains elements of that size and so the size of that struct is a multiple of this size as well. This problem was introduced with commit 03c3d4b7c15. To fix this problem, this commit introduces a int64_t member to struct _pool_chunk that marks the beginning of the free data space. Thanks to this, the compiler ensures proper alignment and sizeof(struct _pool_chunk) becomes a multiple of 8. However, previously the end of the struct marked the beginning of the data and sizeof() was used for correctly calculating offsets to the data section. So, just adding such a member would work, but would also waste some memory. To avoid this, this commit also changes the rest of the pool implementation to accommodate. Reported-by: Nicolas Setton <setton@adacore.com> Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* image: Fix crash in _fill_xrgb32_lerp_opaque_spansBryce Harrington2014-12-051-2/+2
| | | | | | | | | If a span length is negative don't go out of bounds processing the fill data. Patch thanks to Ilya Sakhnenko <ilia.softway@gmail.com> on mailing list. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* win32: Fix compilation of 'cairo-path-stroke-traps.c' with MSVC8Hans Breuer2014-11-201-4/+6
| | | | | | | "The issue here is that Visual Studio 2005+ is quite strict on type conversions (so it wants code to be clear enough on conversions)." Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84908
* Refactor ARRAY_LENGTH macro definitions in test codeBryce Harrington2014-11-207-16/+6
|
* test: Use ARRAY_LENGTH macroBryce Harrington2014-11-203-4/+3
|
* pdf-operators: fix bug with RTL textAdrian Johnson2014-11-201-1/+5
| | | | bug 86461
* Fix one more warning from check-doc-syntax.shRavi Nanjundappa2014-11-121-2/+2
| | | | | | | | | | $ ./check-doc-syntax.sh Checking documentation for incorrect syntax ./cairo-pattern.c (3342): ERROR: Will invalid doc id (should be 'cairo_...:') The proposed changes fixes the warning about the documentation style used in cairo. Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
* xcb: Don't crash when swapping a 0-sized glyphAdam Jackson2014-11-061-0/+6
| | | | | | | | | | malloc(0) needn't return NULL, and on glibc, doesn't. Then we encounter a loop of the form do { ... } while (--c), which doesn't do quite what you were hoping for when c is initially 0. Since there's nothing to swap in this case, just bomb out. Signed-off-by: Adam Jackson <ajax@redhat.com>
* xlib: Don't crash when swapping a 0-sized glyphAdam Jackson2014-11-061-0/+6
| | | | | | | | | | malloc(0) needn't return NULL, and on glibc, doesn't. Then we encounter a loop of the form do { ... } while (--c), which doesn't do quite what you were hoping for when c is initially 0. Since there's nothing to swap in this case, just bomb out. Signed-off-by: Adam Jackson <ajax@redhat.com>
* Improve performance of cpu_to_be32 and be32_to_cpuAdrian Johnson2014-10-311-1/+1
| | | | | | By switching to the more common form, gcc and clang emit a single bswap instruction and truetype subsetting of large fonts runs about 15% faster.
* pdf-operators: only wrap text strings for PS outputAdrian Johnson2014-10-316-16/+31
| | | | | | | | | | | | | since the PS Document Structing Conventions impose a 255 character line limit. PDF does not require wrapping. pdf-operators is designed to emit the same output for PS and PDF. Unfortunately some PDF interpreters don't like strings split with '\\\n' and some PS interpreters don't like strings split with ')('. So we are forced to make pdf-operators handling string wrapping differently for PDF and PS. Bug 85662
* Drop the target-specific huge-radial.pdf.*.ref.png imagesBryce Harrington2014-10-292-0/+0
| | | | | | | | | | | | | | These two images are mis-rendered (clearly evident from visual inspection). By removing them, the test will fall back to the more general format-specific images, huge-radial.argb32.ref.png and huge-radial.rgb24.ref.png. Note that the huge-radial.pdf tests still fail to pass, but the pdiff looks more sensible. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66218 Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
* RELEASING: Be explicit as to which tag is pushedBryce Harrington2014-10-291-1/+1
|
* Fix warnings from check-doc-syntax.shRavi Nanjundappa2014-10-281-2/+2
| | | | | | | | | | | | $ ./check-doc-syntax.sh Checking documentation for incorrect syntax ./cairo-pattern.c (3346): ERROR: Will bad line: ' */' ./cairo-pattern.c (3346): ERROR: Will documentation comment not closed with **/ ./cairo-pattern.c (3422): ERROR: _cairo_pattern_sampled_area invalid doc id (should be 'cairo_...:') The warnings are about the documentation style used in cairo Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
* build: fix regression on mingwAdrian Johnson2014-10-211-2/+2
| | | | | | | | 7cfebce1 removed the filename extension for executables. Patch from http://sourceforge.net/p/inkscape/mailman/message/32939144/ Bug 85120
* tor-scan-converter: can't do_fullrow when intersection in row + 0.5subrowMassimo Valentini2014-10-191-2/+2
| | | | | | | | | | | the active edges list must be left sorted at the next possible use and since full_row does not deal with intersections it is not usable when there is an intersection in the top half of the next row first subrow Reported-and-tested-by: Matthew Leach Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85151 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* Revert "Add execution bit for make-cairo-test-constructors.sh"Bryce Harrington2014-10-181-0/+0
| | | | | | This reverts commit 5c17bf1a33b8e76edeb23121342e0f163fe9d6ad. Script is sourced in the makefile, no need for +x.
* pdf: fix compiler warningAdrian Johnson2014-10-191-1/+1
|
* CFF: Fix unaligned accessAdrian Johnson2014-10-193-35/+58
| | | | | | | | Debian bug 712836 reported bus errors in cff subsetting when running on a sparc. This is because unlike truetype, all data in the compact font format is not aligned. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712836
* Add execution bit for make-cairo-test-constructors.shBryce Harrington2014-10-171-0/+0
| | | | This is referenced in the Makefile but not set as executable
* Update mime type documentation.Adrian Johnson2014-10-171-1/+27
|
* RELEASING: Update tags push commandBryce Harrington2014-10-161-1/+1
| | | | | I couldn't get the documented command to do diddly. Running `git push --tags` achieved what I think was intended.
* Start 1.14.1 developmentBryce Harrington2014-10-131-1/+1
|
* pattern: Restore dropped inclusion of cairoint.h1.14.0Bryce Harrington2014-10-131-0/+2
| | | | | Fixes failure in make release-check due by check-preprocessor-syntax.sh due to requirement that cairoint.h be the first include for source files.
* 1.14.0 releaseBryce Harrington2014-10-131-2/+2
|
* NEWS: Flesh out docs for new APIsBryce Harrington2014-10-132-3/+12
|
* NEWS: Update with latest changes and finalize for releaseBryce Harrington2014-10-131-5/+19
|
* pdf: don't use '\' to split strings across multiple linesAdrian Johnson2014-10-121-1/+1
| | | | | The PDF interpreter in my printer does not handle this correctly. So instead we add the string delimiters '(' and ')' to each line.
* image: Corrected extents calculationsBill Spitzak2014-10-106-153/+176
| | | | | | | | | | | | New implementations of _cairo_pattern_sampled_area and _cairo_pattern_get_extents which produce a more accurate bounding box. These do not depend on side-effects of analyze_filter, can handle different horizontal and vertical scales, filters wider than 1 for down-scaling, and compute a somewhat tighter bounding box in most cases. I removed the pad output of _cairo_pattern_analyze_filter as it is unused. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* xcb: Use image fallback for GOOD/BEST filtersBill Spitzak2014-10-101-18/+16
| | | | | | | | | | | It will not use the fallback if the symbols in the previous patch are turned on. Also some code rearrangement to make this resemble the xlib version more and to remove some suspect bugs. In particular meshes should not work just because the translation is an integer. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* xcb: Add switches for whether XRender supports GOOD/BEST filteringBill Spitzak2014-10-102-1/+15
| | | | | | | Currently these are always false, but if XRender use a pixman that supports filtering these could be turned on for that version. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* xlib: Use image fallback for GOOD/BEST filtersBill Spitzak2014-10-101-9/+14
| | | | | | | | | | | Fallback is not used if the symbols defined in the previous patch to indicate if XRender does GOOD/BEST are true. This patch also includes some changes to take advantage of the fact that if there is an integer translation analyze_filter will already have set the filter to NEAREST. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>