summaryrefslogtreecommitdiff
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* [gobject] Bind cairo_glyph_t and cairo_text_cluster_tBehdad Esfahbod2023-03-092-0/+14
|
* Merge branch 'unused-function' into 'master'Uli Schlachter2023-03-031-6/+6
|\ | | | | | | | | Fix -Wunused-function warnings See merge request cairo/cairo!449
| * Fix -Wunused-function warningsKhaled Hosny2023-02-061-6/+6
| |
* | Remove XML surfaceEmmanuele Bassi2023-02-043-347/+0
|/ | | | | | According to the Debian code search tool, nothing uses it as part of the Cairo public API, and it has been disabled for a long time with nobody complaining about it.
* util: Fix compiler warnings in cairo-sphinxEmmanuele Bassi2023-02-031-3/+8
| | | | Though I'm not sure how useful this tool is.
* Merge branch 'no-more-gl' into 'master'Emmanuele Bassi2023-01-292-249/+0
|\ | | | | | | | | Drop cairo-gl See merge request cairo/cairo!287
| * Drop cairo-glEmmanuele Bassi2023-01-272-249/+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.
* | [malloc-stats] Measure callocBehdad Esfahbod2023-01-261-0/+22
|/
* svg-font: return SVG_FONT_ERROR on errorAdrian Johnson2023-01-201-0/+1
|
* Merge branch 'test-png16-load' into 'master'Uli Schlachter2023-01-151-0/+3
|\ | | | | | | | | Add test for loading 16 bit PNG images See merge request cairo/cairo!241
| * Add remaining image formats to cairo-script constants tableManuel Stoeckl2023-01-111-0/+3
| | | | | | | | | | This makes it possible to read cairo-script files which embed RGB30/RGB96F/RGBA128F images.
* | Defining Windows version macros in meson.buildFujii Hironori2023-01-131-1/+0
|/ | | | | | | | | WINVER and _WIN32_WINNT macros were defined in each source files and headers that were including <windows.h>. However, because DirectWrite requires new Windows API, some files included <windows.h> without the version macros. This inconsistency sometimes caused troubles. Define the version macros in meson.build.
* Remove autotools buildAdrian Johnson2023-01-0812-309/+0
|
* Fix bug in strndup implementationAdrian Johnson2023-01-031-2/+6
| | | | | The strlen() could go past the n bytes and into a memory address we don't have read access to.
* [malloc-stats] Fix to not crashBehdad Esfahbod2022-12-301-1/+9
| | | | Can't use constructor as malloc might be called before that.
* meson: Only link cairo-script-interpreter with liblzoSimon McVittie2022-07-181-1/+1
| | | | | | | The rest of cairo (and therefore most external packages that depend on cairo) doesn't make any use of liblzo. Signed-off-by: Simon McVittie <smcv@debian.org>
* Merge branch 'fix-build-with-newer-libbfd' into 'master'Emmanuele Bassi2022-07-141-2/+2
|\ | | | | | | | | | | | | Fix build with newer binutils-dev installed Closes #581 See merge request cairo/cairo!342
| * Fix build with newer binutils-dev installedSimon McVittie2022-07-141-2/+2
| | | | | | | | | | | | | | | | It seems the PTR typedef (or macro?) has been removed from newer versions of libbfd. Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/581 Signed-off-by: Simon McVittie <smcv@debian.org>
* | util: Don't expose _csi_stack_push in public ABISimon McVittie2022-07-141-1/+1
|/ | | | | | | | | This wasn't previously marked as private because it was initially static inline, and only became extern later. Fixes: 9ffbf63d "fix warning: inlining failed in call to '_csi_stack_push'" Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/580 Signed-off-by: Simon McVittie <smcv@debian.org>
* Update util/cairo-script/cairo-script-interpreter.pc.inPierre Labastie2022-05-141-0/+1
|
* Replace use of ctype functions with internal version where only ASCII chars ↵Adrian Johnson2022-04-091-5/+7
| | | | | | | | | are used In !309 Taylor R Campbell found a number of instances of ctype incorrectly passed a signed char. In many cases, where only ASCII characters are used, the code should have been using the cairo version of the ctype function to avoid locale issues.
* Fix warningAdrian Johnson2022-03-091-1/+1
| | | | ../util/malloc-stats.c:295:1: warning: no previous declaration for ‘malloc_stats’ [-Wmissing-declarations]
* Replace deprecated malloc_hookAdrian Johnson2022-03-093-60/+38
|
* DWrite font docsAdrian Johnson2022-03-051-0/+1
|
* Drop cairo-vg surfaceEmmanuele Bassi2022-02-251-79/+0
| | | | | OpenVG is a failed experiment from 10 years ago, and nobody has been using the cairo-vg surface in pretty much the same amount of time.
* Fix some MinGW warningsAdrian Johnson2021-09-022-1/+8
| | | | | | | | | | | | | | | | | The FT change is because my MinGW build is using a more recent version of FT. Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to fix the defined but not used warning. _cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with the comment: "Currently disable the win32-font text_to_glyphs(), until that one is updated. Or better yet, remove it and implement ucs4_to_index(). It's the toy font API afterall." _cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d.
* gobject: Remove the use of volatileEmmanuele Bassi2021-08-152-92/+92
| | | | | | | | | It is pointless, and it has been deprecated by GLib: https://gitlab.gnome.org/GNOME/glib/-/issues/600 http://c.isvolatileusefulwiththreads.com/ Now we're just getting compiler warnings with recent versions of GCC.
* Added hairline support to cairoRick Yorgason2021-08-151-0/+22
|
* Use uintptr_t for all casts between pointer and integerAdrian Johnson2021-07-253-3/+3
| | | | | | | | | | | | On 64-bit windows, long is 32-bit. When compiling there are a large number of warnings about mismatched sizes when casting long to/from a pointer. Use the (u)intptr_t type for any integer that will have a pointer stored in it. Use a (u)intptr_t cast when integers are stored in pointers to silence warnings. Fixes #263
* Fix meson build without zlibUli Schlachter2021-05-221-0/+2
| | | | | | | | | | | | | | | | | | | | | Trying to build with meson with -Dzlib=disabled failed with the following error message: cairo/test/meson.build:599:2: ERROR: Unknown variable "libcairoscript_dep". This commit fixes that problem by adding a not-found dependency if cairo-script is not built. Additionally, follow-up problems are fixed: - any2ppm.c still tried to include cairo-script-interpreter.h, which was not found - Building cairo-test-trace was attempted, but that also failed because of missing script support. Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/475 Signed-off-by: Uli Schlachter <psychon@znc.in>
* meson: Use more dependency objectsUli Schlachter2021-05-225-29/+22
| | | | | | | | For example, to depend on cairo-script, inccairoscript was added to "include_directories:" and libcairoscript was added to "link_with:". This commit instead uses the libcairoscript_dep dependency everywhere. Signed-off-by: Uli Schlachter <psychon@znc.in>
* meson: Move CAIRO_HAS_INTERPRETER to config.hUli Schlachter2021-05-021-1/+1
| | | | | | | This is what autoconf does and hopefully that means this is the correct thing to do. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Drop the conditional inclusion of config.hEmmanuele Bassi2021-05-019-18/+0
| | | | | | | | | | | | We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion.
* Remove stray _GNU_SOURCE definitionsEmmanuele Bassi2021-05-019-13/+10
| | | | | | We define _GNU_SOURCE globally in both the Autotools build, through the use of the AC_USE_SYSTEM_EXTENSIONS macro; and in the Meson build, with add_project_arguments().
* meson: Define HAVE_CONFIG_H as a project flagEmmanuele Bassi2021-05-016-10/+2
| | | | | | | | Precisely what Autotools does, instead of adding it as per-target C argument. Once we remove HAVE_CONFIG_H checks in every source file, we'll be able to drop it.
* Merge branch 'ebassi/warnings-fixes' into 'master'Uli Schlachter2021-04-271-1/+1
|\ | | | | | | | | Avoid a bunch of compiler warnings See merge request cairo/cairo!166
| * Drop volatile from the GType registrationEmmanuele Bassi2021-04-271-1/+1
| | | | | | | | | | The `volatile` is unnecessary, and newer versions of GLib and GCC will complain if you use it.
* | Use g_memdup2() with newer versions of GLibEmmanuele Bassi2021-04-271-3/+10
|/ | | | | | The g_memdup() function has been deprecated, as it takes the size of the memory area as an unsigned integer. The g_memdup2() replacement uses the more appropriate size_t type, instead.
* meson: make cairo-trace executableTim-Philipp Müller2021-03-092-0/+1
| | | | | | | | Install with exec flag set and make sure tool is executable in build directory as well (by making the input file in the source directory executable). Fixes #462
* utils: remove hacky replacement for backtrace_symbols in glibcTim-Philipp Müller2021-02-234-408/+2
| | | | | | | Doesn't build any more, is very much non-essential, and hasn't been touched in any meaningful way since it was added 13 years ago, so just remove it for now until someone steps up. Chances are the glibc version has improved since then.
* cairo-trace: fix build with newer versions of bfdTim-Philipp Müller2021-02-231-4/+3
| | | | | | | | | And update configure/meson checks to check for the new function. Drop libiberty.h check since it's only needed by backtrace-symbols.c which we're about to remove. Closes #391, #460
* meson: only build cairo-boilerplate and cairo-missing helper libs if neededTim-Philipp Müller2021-01-151-0/+2
| | | | | Used by tests and the sphinx utility, which may or may not be built, and if they're not built we don't need to build those libs either.
* meson: Generate cairo-script-interpreter.pc needed by GTK+Xavier Claessens2020-12-224-1/+31
|
* meson: fix library versioningTim-Philipp Müller2020-12-152-4/+4
| | | | Fixes #442
* cairo-trace: Fix escape character encoding in string literalsGeorge Matsumura2020-11-201-0/+1
| | | | | | | This fixes a typo wherein both a return character and a tab character were encoded when only a return character was specified for encoding. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
* build: Fix various compiler warningsGeorge Matsumura2020-11-074-3/+10
| | | | | | This fixes a few compiler warnings that were encountered with gcc 9.3.0. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
* cairo-gobject: Missing cairo include directoriesXavier Claessens2020-10-071-1/+2
| | | | | When cairo is a subproject and application uses libcairogobject_dep, it was missing include directories set in libcairo_dep.
* meson: Use pkgmod.generate() for all cairo pc filesXavier Claessens2020-10-061-0/+8
| | | | | Also override each dependency so they can be used when cairo is used as subproject.
* meson: Fix build when libpng is not foundXavier Claessens2020-10-031-1/+1
| | | | | | trace-to-xml.c needs cairo-xml.h which is only available when CAIRO_HAS_XML_SURFACE feature is built which is only available when both zlib and png are found. CAIRO_HAS_INTERPRETER only requires zlib.
* meson: Fix cross build with Android NDKXavier Claessens2020-10-021-1/+1
| | | | | Android NDK does not contain execinfo.h so malloc-stats.c cannot be built.