Commit graph

12160 commits

Author SHA1 Message Date
Adrian Johnson
5e76dd7a5c Merge branch 'fix-comparison-warning' into 'master'
Fix comparison is always false in malloc overflow check

See merge request cairo/cairo!236
2021-08-27 23:44:08 +00:00
Adrian Johnson
9bb1cbf724 Merge branch 'fix-warnings' into 'master'
Fix build warnings

See merge request cairo/cairo!239
2021-08-27 23:41:56 +00:00
Adrian Johnson
a8c8363e35 Add overflow to Makefile.sources 2021-08-26 21:05:55 +09:30
Adrian Johnson
068e9b2eb4 Fix malloc overflow check warning
To fix this warning:

../src/cairo-malloc-private.h:83:32: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   83 |   ((size) != 0 && (size_t) (a) >= SIZE_MAX / (size_t) (size) ? NULL : \
      |                                ^~

Create two new macros to do the overflow checks:
_cairo_addl_size_t_overflow and _cairo_mul_size_t_overflow. Implement
them using compiler builtins where available.

Update cairo-malloc-private to use these fuctions and add an overflow
test to test the functions.
2021-08-24 07:26:35 +09:30
Adrian Johnson
0d809e8051 Fix file mode of mime_unqiue-id.c 2021-08-24 07:26:35 +09:30
Uli Schlachter
923715f2e9 Merge branch 'fix-png-write-endian' into 'master'
Read/write 16-bpc PNG data in native endian

Closes #501

See merge request cairo/cairo!230
2021-08-23 16:31:57 +00:00
Adrian Johnson
9f44d4c7c5 Merge branch 'ps-image' into 'master'
Fix PS emit image for 16-bit images

See merge request cairo/cairo!242
2021-08-22 06:48:10 +00:00
Adrian Johnson
ca3e776abe Fix PS emit image for 16-bit images 2021-08-22 15:19:47 +09:30
Adrian Johnson
78d267ee7a Fix some warnings 2021-08-22 12:07:36 +09:30
Adrian Johnson
ba3823e6b8 Fix cast between incompatible function types warnings
warning: cast between incompatible function types from ‘cairo_status_t (*)(void *, const cairo_point_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *)’} to ‘cairo_status_t (*)(void *, const cairo_point_t *, const cairo_slope_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *, const struct _cairo_slope *)’} [-Wcast-function-type]
2021-08-22 12:07:36 +09:30
Adrian Johnson
2dec76ddfe Merge branch 'warning-level' into 'master'
meson: Use warning_level

See merge request cairo/cairo!237
2021-08-16 20:09:59 +00:00
Emmanuele Bassi
e2f83446f9 Merge branch 'glib-volatile' into 'master'
gobject: Remove the use of volatile

See merge request cairo/cairo!238
2021-08-15 19:25:58 +00:00
Emmanuele Bassi
4c38b3db99 gobject: Remove the use of volatile
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.
2021-08-15 19:29:53 +01:00
Emmanuele Bassi
8ee4d5f1d3 meson: Enable _FORTIFY_SOURCE for optimized builds
Otherwise we are going to get warnings from the C library.
2021-08-15 19:12:49 +01:00
Emmanuele Bassi
8b5e285e26 meson: Use warning_level
Instead of using `-Wall` and `-Wextra` as compiler flags, set
`warning_level=2` as the default warning option.
2021-08-15 19:06:10 +01:00
Uli Schlachter
919178f1e9 Merge branch 'ebassi/build-fixes' into 'master'
build: Use subdir-objects

See merge request cairo/cairo!180
2021-08-15 13:57:42 +00:00
Uli Schlachter
3dc9607f8d Merge branch 'color-user-font-getter' into 'master'
Add cairo_user_font_face_get_render_color_glyph_func

See merge request cairo/cairo!233
2021-08-15 13:56:42 +00:00
Adrian Johnson
c773060195 Merge branch 'HairlineStroke' into 'master'
Added hairline support to cairo

See merge request cairo/cairo!21
2021-08-15 06:58:54 +00:00
Rick Yorgason
ecec0419f8 Added hairline support to cairo 2021-08-15 06:58:54 +00:00
Tim-Philipp Müller
9f973bc433 Merge branch 'meson-update-wrap-versions' into 'master'
Meson: update wrap versions

Closes #416

See merge request cairo/cairo!133
2021-08-14 22:41:45 +00:00
Tim-Philipp Müller
61aa6dc0e1 ci: make sure existing subproject checkouts are in sync with wraps 2021-08-14 22:56:20 +01:00
Tim-Philipp Müller
34038cc773 meson: subprojects: use upstream freetype meson port and use latest release
Closes #416
2021-08-14 22:56:00 +01:00
Tim-Philipp Müller
e502f70399 meson: subprojects: update zlib wrap to latest revision 1.2.11-5 2021-08-14 22:54:05 +01:00
Tim-Philipp Müller
b6025e96c6 meson: subprojects: update glib wrap to latest stable 2.66.7 2021-08-14 22:54:05 +01:00
Tim-Philipp Müller
fb5e816c31 meson: subprojects: update expat wrap to latest version 2021-08-14 22:54:05 +01:00
Adrian Johnson
112349719b Merge branch 'ebassi/meson-gtk-doc' into 'master'
meson: Build the API reference

See merge request cairo/cairo!168
2021-08-14 21:35:07 +00:00
Emmanuele Bassi
6c3b7a487b meson: Build the API reference
The Meson build system should build the API reference using gtk-doc,
like the Autotools build does.

The option is called `gtk_doc`, which matches the existing practices in
various projects using Meson and gtk-doc.
2021-08-14 15:34:23 +01:00
Adrian Johnson
d0a2031c5c Merge branch 'fix-color-glyph-compositing' into 'master'
Fix compositing non-color glyphs in one case

See merge request cairo/cairo!224
2021-08-14 12:08:32 +00:00
Adrian Johnson
8c3c41ca73 Add cairo_user_font_face_get_render_color_glyph_func 2021-08-14 18:26:09 +09:30
Adrian Johnson
48d6061149 Merge branch 'meson-warnings' into 'master'
copy all autotools compiler warnings to meson build

See merge request cairo/cairo!215
2021-08-14 07:24:41 +00:00
Adrian Johnson
ebac15cb04 copy all autotools compiler warnings to meson build 2021-08-14 07:24:40 +00:00
Adrian Johnson
87cf0fc285 Merge branch 'issue-404' into 'master'
Fix color fonts when antialias == SUBPIXEL or NONE

Closes #404

See merge request cairo/cairo!229
2021-08-14 07:06:35 +00:00
Adrian Johnson
1e446cb31e Fix color fonts when antialias == SUBPIXEL or NONE 2021-08-14 07:06:34 +00:00
Adrian Johnson
773236010f Merge branch 'endian' into 'master'
meson: add BIGENDIAN

See merge request cairo/cairo!214
2021-08-14 06:25:15 +00:00
Adrian Johnson
6ea9ec75ed Merge branch 'issue-389' into 'master'
Add color user-font support

See merge request cairo/cairo!223
2021-08-14 06:06:20 +00:00
Adrian Johnson
62cc53f9b8 Add color user-font support
Adds new API cairo_user_font_face_set_render_color_glyph_func()
to set a color glyph renderer.
2021-08-14 06:06:19 +00:00
Adrian Johnson
bb10f06985 Merge branch 'mingw-warnings' into 'master'
Fix some mingw warnings and correct the value of R_OK

See merge request cairo/cairo!231
2021-08-07 07:23:55 +00:00
Adrian Johnson
76331f654e Fix some mingw warnings and correct the value of R_OK 2021-08-07 15:44:21 +09:30
Adrian Johnson
1091134258 Merge branch 'MMAP-bug' into 'master'
Fixed compile-time error on platforms without MMAP.

See merge request cairo/cairo!225
2021-08-07 05:38:04 +00:00
Adrian Johnson
ed017e10f9 Merge branch 'STRNDUP-bug' into 'master'
Added extra check for HAVE_STRNDUP in Win32 Mingw Meson build

See merge request cairo/cairo!226
2021-08-07 05:37:30 +00:00
Manuel Stoeckl
2fb156bdc0 Read/write 16-bpc PNG data in native endian
The png_set_swap function does not affect 8-bpc data.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2021-08-06 19:09:03 -04:00
Adrian Johnson
69fdca480c Merge branch 'win32-printing-fix' into 'master'
Check correctly for surface_pattern being a recording in...

See merge request cairo/cairo!228
2021-08-04 11:41:24 +00:00
Jonathan Kew
67c91db455 Check correctly for surface_pattern being a snapshot/recording in _cairo_win32_printing_surface_paint_pattern.
(Corrected patch as proposed by Uli Schlachter.)

Fixes poor-quality print output on Windows reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1721127.
2021-08-04 11:58:49 +01:00
Matthias Clasen
4e859ddb19 Fix compositing non-color glyphs in one case
The intention here is: "if show_text_glyphs is unsupported,
try show_gyphs". We need to make sure to set the status to
unsupported before checking it, otherwise we end up looking
at the status that was set by composite_color_glyphs if
show_text_glyphs is NULL.

This showed up in https://github.com/harfbuzz/harfbuzz/issues/2675
2021-08-02 12:37:27 -04:00
Rick Yorgason
ada76e80db Fixed compile-time error on platforms without MMAP. 2021-08-01 17:34:14 -07:00
Rick Yorgason
3ee18ffc28 Added extra check for HAVE_STRNDUP in Win32 Mingw Meson build
Mingw on Windows defines the strndup function, but it's not actually usable because string.h doesn't exist. See details on the Meson bug here: https://github.com/mesonbuild/meson/issues/3672

Note that although Meson marked this bug as "fixed", it's only fixed in the case where you're using `prefix : '#include <string.h>'`.
2021-08-01 17:30:06 -07:00
Heiko Lewin
4dd48f0979 Merge branch 'fix_infinite_loop' into 'master'
_arc_max_angle_for_tolerance_normalized: fix infinite loop

See merge request cairo/cairo!155
2021-08-01 11:16:04 +00:00
Heiko Lewin
ab2c5ee21e _arc_max_angle_for_tolerance_normalized: fix infinite loop 2021-08-01 11:16:03 +00:00
Heiko Lewin
6a916648d5 Merge branch 'fix_clip_leak' into 'master'
Fix clip leak

See merge request cairo/cairo!158
2021-08-01 11:10:40 +00:00
Heiko Lewin
7176cc8f0f Fix clip leak 2021-08-01 11:10:40 +00:00