Commit graph

12416 commits

Author SHA1 Message Date
Uli Schlachter
12cd2bcbb2 Merge branch 'testfix' into 'master'
Zero terminate temp buffers before calling strcat.

See merge request cairo/cairo!369
2022-11-25 13:23:31 +00:00
Jussi Pakkanen
44ff5e4e6c Zero terminate temp buffers before calling strcat. 2022-11-24 22:41:36 +02:00
Uli Schlachter
8cb6deed39 Merge branch 'pass-quartz-tests' into 'master'
Pass quartz tests

See merge request cairo/cairo!367
2022-11-18 15:54:40 +00:00
John Ralls
c014a7dda3 Require macOS CI job to pass again. 2022-11-17 16:20:23 -08:00
John Ralls
04cf47b57a Change expected fails and reference image so that Quartz CI passes. 2022-11-17 16:20:14 -08:00
Emmanuele Bassi
f672f20f02 Merge branch 'fix-long-lines' into 'master'
Pass the same type when creating the static glyphs and positions arrays.

Closes #574

See merge request cairo/cairo!366
2022-11-17 22:18:17 +00:00
John Ralls
21ab756bd9 Pass the same type when creating the static glyphs and positions arrays.
Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/574
2022-11-17 10:49:18 -08:00
Uli Schlachter
8f1190dc82 Merge branch 'remove-explicit-dependency-on-libssp' into 'master'
Remove explicit dependency on libssp

See merge request cairo/cairo!360
2022-10-28 13:06:36 +00:00
Luca Bacci
392b2b02f7 perf: fix compilation on Win32 2022-10-28 12:44:45 +02:00
Luca Bacci
c75220fe08 Remove explicit dependency on libssp
It's not needed anymore.

Linking explicitly with libssp was required for toolchains where the
target libc doesn't implement stack smashing protection routines on
its own, and instead delegates to the generic implementations provided
by libssp. Notably, this was the case of mingw-w64 toolchains.

After discussion upstream with Meson developers [1], the stance taken
is that Meson users (and Meson itself) shall have no knowledge of the
libc internals and whether libssp is required. instead, libc's should
declare a dependency on the generic libssp on their own by means of
.spec files [2].

Following the discussion in Meson Github, the issue was then fixed in
mingw-w64 upstream [3].

References:
 * https://github.com/mesonbuild/meson/issues/10673
 * https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
 * https://github.com/msys2/MINGW-packages/issues/13401
2022-10-28 12:44:45 +02:00
Tim-Philipp Müller
0a111ad1fa Merge branch 'ci-update-windows-image' into 'master'
ci: update Windows image to latest,  update glib wrap, and add separate msvc jobs for shared and static build

See merge request cairo/cairo!364
2022-10-28 00:21:31 +00:00
Tim-Philipp Müller
cb726f5729 ci: mark macOS job as allowed to fail, unit tests are broken 2022-10-28 00:20:20 +01:00
Tim-Philipp Müller
b9074f9525 ci: bump macOS image to latest / 12.3 2022-10-27 19:40:09 +01:00
Tim-Philipp Müller
e25511ecd6 Fix build on Windows with -Ddefault_library=static
cairo-perf-chart.c.obj : error LNK2019: unresolved external symbol __imp_cairo_create referenced in function main
etc.
2022-10-27 18:18:58 +01:00
Tim-Philipp Müller
bd8bd609f6 ci: update Windows image to latest, and glib wrap too
Glib subproject git checkout isn't cached any more on the
GStreamer CI image, so use tarball for now, and update to
more recent glib.

This means we can no longer use --default-library=both on
Windows, so add separate jobs for static/shared build.
2022-10-27 15:39:02 +01:00
Uli Schlachter
2cfd08664d Merge branch 'scaled-font-make-mutex-recursive' into 'master'
Make cairo_scaled_font_t::mutex recursive

See merge request cairo/cairo!356
2022-09-13 16:27:48 +00:00
Uli Schlachter
a7d31a8714 Merge branch 'fix-issue-587' into 'master'
Check for cache not frozen in glyph_page_can_remove()

Closes #587

See merge request cairo/cairo!355
2022-09-05 20:21:38 +00:00
Luca Bacci
166d718099 Check for scaled_font::cache_frozen in glyph_page_can_remove()
With modifications kindly suggested by Uli Schlachter

Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/587
2022-09-05 21:42:49 +02:00
Luca Bacci
531ec8d02d Make cairo_scaled_font_t mutex recursive
Since it can now happen to acquire it recursively,
see https://gitlab.freedesktop.org/cairo/cairo/-/issues/587
2022-09-05 19:41:19 +02:00
Uli Schlachter
0e27a8046e Merge branch 'mismatched-new-delete' into 'master'
Pair usage of operator new[] with a corresponding delete[]

See merge request cairo/cairo!354
2022-09-03 12:55:05 +00:00
Luca Bacci
8266d2d5f2 Pair usage of operator new[] with a corresponding delete[] 2022-09-03 14:16:04 +02:00
Uli Schlachter
716c216ebc Merge branch 'ofz50805' into 'master'
ofz#50805 crash seen in fuzzing libreoffice text rendering

See merge request cairo/cairo!350
2022-09-02 12:28:57 +00:00
Caolán McNamara
5c7e2dafd5 ofz#50805 crash seen in fuzzing libreoffice text rendering
pixman_image_get_format /work/workdir/UnpackedTarball/pixman/pixman/pixman-image.c:939:16
 _cairo_ft_scaled_glyph_init_surface /work/workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2574:9
 _cairo_ft_scaled_glyph_init /work/workdir/UnpackedTarball/cairo/src/cairo-ft-font.c:2754:11
 _cairo_scaled_glyph_lookup /work/workdir/UnpackedTarball/cairo/src/cairo-scaled-font.c:3073:11
 composite_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-image-compositor.c:910:15
 composite_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2295:12
 clip_and_composite /work/workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:1049:15
 _cairo_traps_compositor_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-traps-compositor.c:2331:11
 _cairo_compositor_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-compositor.c:292:11
 _cairo_image_surface_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-image-surface.c:1030:12
 _cairo_surface_show_text_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-surface.c:2920:15
 _cairo_gstate_show_text_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo-gstate.c:0
 cairo_show_glyphs /work/workdir/UnpackedTarball/cairo/src/cairo.c:3670:14
 CairoTextRender::DrawTextLayout(GenericSalLayout const&, SalGraphics const&) /src/libreoffice/vcl/unx/generic/gdi/cairotextrender.cxx:337:9
2022-08-31 10:30:13 +01:00
Uli Schlachter
c188715bbe Merge branch 'pdfarray' into 'master'
Add missing commas to array values.

See merge request cairo/cairo!348
2022-08-03 11:34:02 +00:00
Jussi Pakkanen
ffc133f703 Add missing commas to array values. 2022-08-03 13:56:15 +03:00
Uli Schlachter
541719ff75 Merge branch 'issue-579' into 'master'
Fix issue 579

Closes #579

See merge request cairo/cairo!340
2022-08-02 11:37:58 +00:00
Tim-Philipp Müller
afba396847 Merge branch 'ci-update-windows-image' into 'master'
ci: update windows image and use new 2022 runner and vs2019

See merge request cairo/cairo!347
2022-07-22 14:37:32 +00:00
Uli Schlachter
f482106645 Merge branch 'use-meson-test-for-scripts' into 'master'
CI: Invoke several of the test scripts via `meson test`

See merge request cairo/cairo!345
2022-07-22 14:30:59 +00:00
Tim-Philipp Müller
0532f29a6d ci: update windows image and use new 2022 runner and vs2019
Old 1809 runner is going to go away at some point.
2022-07-21 14:37:00 +01:00
Uli Schlachter
7c998fa019 Merge branch 'lzo-only-in-script' into 'master'
meson: Only link cairo-script-interpreter with liblzo

See merge request cairo/cairo!346
2022-07-18 16:25:09 +00:00
Simon McVittie
179c27b1d7 meson: Only link cairo-script-interpreter with liblzo
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>
2022-07-18 10:01:38 +01:00
Simon McVittie
25ee24000e CI: Invoke test scripts via meson test where possible
Using `meson test` is the Meson equivalent of `make check`, and is the
way developers of other Meson-built projects will generally expect to
run tests. In particular, it encapsulates which of the tests want to be
run from which directories, removing the need for the Gitlab-CI
integration to know this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-07-14 18:36:23 +01:00
Simon McVittie
947f40f511 meson: Split tests up into test suites
This allows things like `meson test --no-suite=slow` to run subsets
of the complete set of tests.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-07-14 18:12:50 +01:00
Uli Schlachter
da5450e729 Merge branch 'run-check-scripts-in-ci' into 'master'
Run test scripts in meson CI

See merge request cairo/cairo!299
2022-07-14 16:59:27 +00:00
Uli Schlachter
1dc945863b Fix complaints from check-preprocessor-syntax.sh
Checking that public header files #include "cairo.h" first (or none)
Checking that private header files #include "some cairo header" first (or none)
Checking that source files #include "cairoint.h" first (or none)
./win32/cairo-dwrite-font-public.c:#include "cairo-win32-private.h"
Checking that there is no #include <cairo.*.h>
./win32/cairo-dwrite-font-public.c: * #include <cairo-win32.h>
Checking that feature conditionals are used with #if only (not #ifdef)

This adds a missing cairoint.h include and makes
check-preprocessor-syntax.sh slightly better in not warning about
includes in C comments.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-07-14 18:21:54 +02:00
Uli Schlachter
913f4767e7 Run test scripts in meson CI
The autofoo build is on its way out and I am too lazy to properly
integrate these scripts with the meson build. Thus, this commit just
adds them to one single CI build. At least those that can relatively
easily be made to work. The others are left as comments.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-07-14 18:21:23 +02:00
Emmanuele Bassi
74f2da7b70 Merge branch 'fix-build-with-newer-libbfd' into 'master'
Fix build with newer binutils-dev installed

Closes #581

See merge request cairo/cairo!342
2022-07-14 10:41:29 +00:00
Emmanuele Bassi
3bb33e1641 Merge branch 'privatize-csi-stack-push' into 'master'
util: Don't expose _csi_stack_push in public ABI

Closes #580

See merge request cairo/cairo!341
2022-07-14 10:41:11 +00:00
Simon McVittie
24996e6ee2 Fix build with newer binutils-dev installed
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>
2022-07-14 10:27:41 +01:00
Simon McVittie
f02f70d88e util: Don't expose _csi_stack_push in public ABI
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>
2022-07-14 10:21:57 +01:00
Uli Schlachter
53faf76e57 Fix issue 579
cairo-trutype-subset.c would blindly trust a font saying that its name
list has thousands of entries. This commit changes find_name() to also
get the size of the input memory region and to do some bounds checking
on its memory accesses.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/579
Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-07-07 17:30:15 +02:00
Tim-Philipp Müller
2ff9afb737 Merge branch 'meson-list' into 'master'
Meson: use arrays to provide multiple arguments

See merge request cairo/cairo!339
2022-07-06 10:59:30 +00:00
Luca Bacci
c479479b69 Meson: use an array to provide multiple arguments 2022-07-06 12:05:00 +02:00
Adrian Johnson
ff08edfcc6 Merge branch 'color-option' into 'master'
Add color mode font option

See merge request cairo/cairo!333
2022-06-30 23:00:12 +00:00
Jeff Muizelaar
d64f9699eb Merge branch 'quartz-memcpy' into 'master'
quartz: Avoid reading beyond the end of image surfaces.

See merge request cairo/cairo!337
2022-06-30 16:03:16 +00:00
Jeff Muizelaar
cccc81ccba quartz: Avoid reading beyond the end of image surfaces.
The last row of data may have less than stride bytes so make sure we
only copy what we need.
2022-06-29 21:30:08 -04:00
Adrian Johnson
c68ff21e40 Merge branch 'mutex-fix' into 'master'
[mutex] Fix build with no mutexes

See merge request cairo/cairo!338
2022-06-29 22:38:49 +00:00
Behdad Esfahbod
b29f467330 [mutex] Fix build with no mutexes
NOOP1 is a statement, not an expression.
2022-06-29 11:16:04 -06:00
Adrian Johnson
cdb7c298c7 svg: Fix invalid output when image size is 0x0
cairo_surface_write_to_png_stream fails if width or height is 0
2022-06-26 09:54:15 +09:30
Adrian Johnson
99d59f00d6 Test color_mode option in ft-color-font test 2022-06-26 09:54:15 +09:30