Commit graph

12026 commits

Author SHA1 Message Date
Uli Schlachter
04697b33af Move test failure lists into separate files
Before this commit, .gitlab-ci.yml is way too large, because it contains
the list with all the expected test failure. This commit moves those
lists to extra files.

The files were generated with a shell one-liner:

  grep CAIRO_TEST_IGNORE .gitlab-ci.yml | while read line ; do
  backend=$(echo $line | cut -f 3 -d ' ' | cut -f1 -d= | sed -e
  's/CAIRO_TEST_IGNORE_//;s/_/-/g') ; content=$(echo $line | cut -f2-
  -d=) ; echo $backend ; echo $content >
  .gitlab-ci/ignore-${backend}.txt ; done

The changes to .gitlab-ci.yml were also generated with some shell
scripting that generates a sed argument:

  grep CAIRO_TEST_IGNORE .gitlab-ci.yml | while read line ; do
  backend=$(echo $line | cut -f 3 -d ' ' | cut -f1 -d= ) ; file=$(echo
  $backend | sed -e 's/CAIRO_TEST_IGNORE_//;s/_/-/g') ; printf
  "/$backend/s#=.*#=\$(cat .gitlab-ci/ignore-${file}.txt)#;"; done ;
  echo

The above can then be applied via (but of course adding ' around it and
I also left out the final ;):

  sed -i -e [the output of the above] .gitlab-ci.yml

Just for completeness, [the output of the above] is:

  /CAIRO_TEST_IGNORE_pdf_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-pdf-argb32.txt)#;/CAIRO_TEST_IGNORE_pdf_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-pdf-rgb24.txt)#;/CAIRO_TEST_IGNORE_script_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-script-argb32.txt)#;/CAIRO_TEST_IGNORE_image_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-image-argb32.txt)#;/CAIRO_TEST_IGNORE_image_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-image-rgb24.txt)#;/CAIRO_TEST_IGNORE_image16_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-image16-rgb24.txt)#;/CAIRO_TEST_IGNORE_recording_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-recording-argb32.txt)#;/CAIRO_TEST_IGNORE_recording_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-recording-rgb24.txt)#;/CAIRO_TEST_IGNORE_svg11_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-svg11-argb32.txt)#;/CAIRO_TEST_IGNORE_svg11_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-svg11-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-argb32.txt)#;/CAIRO_TEST_IGNORE_xcb_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_window_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-window-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_window__rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-window--rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_render_0_0_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-render-0-0-argb32.txt)#;/CAIRO_TEST_IGNORE_xcb_render_0_0_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-render-0-0-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_fallback_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-fallback-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-argb32.txt)#;/CAIRO_TEST_IGNORE_xlib_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_window_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-window-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_render_0_0_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-render-0-0-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_fallback_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-fallback-rgb24.txt)#;/CAIRO_TEST_IGNORE_quartz_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-quartz-argb32.txt)#;/CAIRO_TEST_IGNORE_quartz_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-quartz-rgb24.txt)#;

(All line breaks are only added for readability and are not part of the
one-liners)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:09:08 +02:00
Uli Schlachter
2edcb1ac23 Merge branch 'jfkthame-master-patch-75366' into 'master'
[pdf-interchange] Write trees even if only LINK tags are present

Closes #487

See merge request cairo/cairo!185
2021-06-02 10:24:33 +00:00
Uli Schlachter
267d0e1c98 Merge branch 'issue_488' into 'master'
Allow empty postscript name when using a CFF font in pdf

Closes #488

See merge request cairo/cairo!186
2021-06-02 10:23:26 +00:00
Uli Schlachter
5ae89cf30e Merge branch 'svg-backend-work' into 'master'
Work on the SVG backend

Closes #361, #431, #78, #4, poppler/poppler#761, poppler/poppler#619, #107, poppler/poppler#268, #73, and #478

See merge request cairo/cairo!152
2021-05-30 10:38:09 +00:00
afdw
9ab52c9131 Merge branch 'master' into 'svg-backend-work'
# Conflicts:
#   .gitlab-ci.yml
#   test/Makefile.sources
#   test/meson.build
2021-05-29 18:32:53 +02:00
Anton Danilkin
ec2cf9ac35 Ignore build instead of builddir 2021-05-29 18:13:30 +02:00
Anton Danilkin
1e27ca7d45 Remove unused _cairo_hash_table_size 2021-05-29 18:04:45 +02:00
Calixte Denizet
a5b5679610 Allow empty postscript name when using a CFF font in pdf
- it aims to fix issue #488.
2021-05-26 19:21:08 +02:00
Jonathan Kew
60d7ff988b [pdf-interchange] Write trees even if only LINK tags are present
This avoids the PDF ending up with invalid xref entries for objects that were "reserved"
but then never output.

Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/487.
2021-05-24 16:31:47 +00:00
Uli Schlachter
63f0d62684 Merge branch 'meson-defines' into 'master'
meson: Move CAIRO_HAS_INTERPRETER to config.h

See merge request cairo/cairo!174
2021-05-21 15:36:44 +00:00
Uli Schlachter
936e5ce8ee Merge branch 'xcb-free-xid-cache' into 'master'
xcb: Remove free XID cache

Closes #434

See merge request cairo/cairo!175
2021-05-21 15:35:59 +00:00
Uli Schlachter
91225d4dd7 Merge branch 'SVG-doc-scanner' into 'master'
#483

See merge request cairo/cairo!182
2021-05-20 15:43:16 +00:00
Uli Schlachter
9fcc7fb0bf Merge branch 'doc-scanner' into 'master'
Issue #482

See merge request cairo/cairo!181
2021-05-20 15:41:56 +00:00
Glash Gnome
7bf3a780ba #483
Fix Enum_member_description
2021-05-13 23:21:26 +00:00
Glash Gnome
7aa5e25772 Issue #482
Documentation stanza
2021-05-13 22:36:06 +00:00
Uli Schlachter
7c7b4e35bc Merge branch 'macos-dejavu' into 'master'
Install DejaVu fonts on macOS

See merge request cairo/cairo!179
2021-05-08 06:08:48 +00:00
Anton Danilkin
1339e5c275 Install DejaVu fonts on macOS
This also fixes some test failures.
2021-05-08 00:01:11 +02:00
Tim-Philipp Müller
0a4ba0507c Merge branch 'macos-artifacts' into 'master'
Export test images in artifacts on macOS

See merge request cairo/cairo!178
2021-05-06 23:17:34 +00:00
Anton Danilkin
37443761c9 Export test images in artifacts on macOS 2021-05-07 00:45:09 +02:00
Uli Schlachter
929262dd54 Merge branch 'jfkthame-master-patch-60882' into 'master'
Bail early from _cairo_image_compute_color if image is zero-sized.

See merge request cairo/cairo!177
2021-05-05 14:48:20 +00:00
Jonathan Kew
ac23567a0c Bail early from _cairo_image_compute_color if image is zero-sized.
This avoids the risk of encountering undefined behavior when computing the `pixel` pointer (even though it won't actually be used) in the case where the image width or height is zero and the data is NULL. (Observed when called from cairo_pdf_surface code when an extreme scaling transform was present, though I guess there are probably other ways to end up with such an image.)
2021-05-05 13:43:57 +00:00
Anton Danilkin
c2bf6e8ae4 Fix remaining tests 2021-05-05 00:51:01 +02:00
Anton Danilkin
9e497a3cb8 Introduce CAIRO_BOILERPLATE_OPEN_NO_DAEMON and CAIRO_BOILERPLATE_DO_NOT_CRASH_ON_ANY2PPM_ERROR 2021-05-03 23:38:28 +02:00
Anton Danilkin
42128f1742 Fix reference images 2021-05-03 22:13:16 +02:00
Anton Danilkin
5b678d8185 Fix applying shifted operators 2021-05-03 16:33:05 +02:00
Anton Danilkin
c30a031a68 Fix painting of glyphs 2021-05-03 09:58:40 +02:00
Anton Danilkin
55b57b2c68 Fix operators in Chrome 2021-05-03 00:30:57 +02:00
Anton Danilkin
10552fa78f Use g instead of symbol for glyphs 2021-05-03 00:30:14 +02:00
Anton Danilkin
62628c8886 Migrate from cairo_output_stream_t to cairo_svg_stream_t 2021-05-02 21:38:02 +02:00
Uli Schlachter
45cca0c984 meson: Move CAIRO_HAS_INTERPRETER to config.h
This is what autoconf does and hopefully that means this is the correct
thing to do.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-02 21:25:48 +02:00
Uli Schlachter
009d75b8db xcb: remove free pixmap/gc wrappers
With the last commit, these became pointless. Just switch the code to
call the underlying function directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-02 19:30:28 +02:00
Anton Danilkin
56378ee69e Do not try to emulate the fill_stroke operations ourselves 2021-05-02 19:28:55 +02:00
Uli Schlachter
c16094fc44 xcb: Remove free XID cache
cairo-xcb kept a cache of free xid to avoid calling xcb_generate_id()
later. However, this is unsafe: When libxcb runs out of ids, it asks the
X11 server for an empty range of ids to use. The X11 server of course
does not know about cairo's cache and could hand out an id that cairo
will use again later. This would then result in BadIdChoice errors
later.

Fix this by simply removing the whole cache.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/434
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-02 17:49:32 +02:00
Uli Schlachter
4f61b765c9 Merge branch 'record-png-offset' into 'master'
Add a test case for commit d07fb41056

See merge request cairo/cairo!122
2021-05-02 14:55:48 +00:00
Uli Schlachter
aa02315243 Merge branch 'ebassi/config-define' into 'master'
meson: Define HAVE_CONFIG_H as a project flag

See merge request cairo/cairo!172
2021-05-02 05:48:26 +00:00
Anton Danilkin
8f4668b4bf Disable support for SVG 2 operators 2021-05-01 23:40:02 +02:00
Anton Danilkin
bd487e64fc Add support for CAIRO_CONTENT_COLOR 2021-05-01 23:14:24 +02:00
Anton Danilkin
a3e01d9e8c Emit a transparent paint in "lerp_compositing_group"s to extends the bounds of the REMOVE_COLOR_AND_INVERT_ALPHA filter 2021-05-01 23:05:03 +02:00
Emmanuele Bassi
bd13841257 Drop the conditional inclusion of config.h
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.
2021-05-01 17:05:29 +01:00
Emmanuele Bassi
bfd1602db9 Remove stray _GNU_SOURCE definitions
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().
2021-05-01 16:58:15 +01:00
Emmanuele Bassi
8336309794 meson: Define HAVE_CONFIG_H as a project flag
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.
2021-05-01 16:55:38 +01:00
afdw
cd0082338e Merge branch 'master' into 'svg-backend-work'
# Conflicts:
#   src/cairo-gstate.c
2021-05-01 14:40:52 +00:00
Uli Schlachter
8f6cfe4177 Merge branch 'ci-test-x11' into 'master'
CI: Check test results for cairo-xcb and cairo-x11

See merge request cairo/cairo!165
2021-04-30 12:12:22 +00:00
Emmanuele Bassi
4c4e6127f4 Merge branch 'jfkthame-master-patch-60864' into 'master'
Don't leave the shm field uninitialized when building without shm support.

See merge request cairo/cairo!170
2021-04-29 09:18:07 +00:00
Jonathan Kew
cb86c13b62 Don't leave the shm field uninitialized when building without shm support.
This can result in reading an uninitialized value in draw_image_boxes() in cairo-xlib-render-compositor.c.
2021-04-29 08:52:31 +00:00
Uli Schlachter
64e1fd70ec Merge branch 'ebassi/warnings-fixes' into 'master'
Avoid a bunch of compiler warnings

See merge request cairo/cairo!166
2021-04-27 16:30:44 +00:00
Uli Schlachter
47770fc2b7 Merge branch 'ebassi/deprecations' into 'master'
Use g_memdup2() with newer versions of GLib

See merge request cairo/cairo!167
2021-04-27 16:24:29 +00:00
Emmanuele Bassi
efab74f5a1 Drop volatile from the GType registration
The `volatile` is unnecessary, and newer versions of GLib and GCC will
complain if you use it.
2021-04-27 16:59:35 +01:00
Emmanuele Bassi
0f39b79575 Define _GNU_SOURCE in order to use memmem
The memmem() function is a GNU extension, which means we need to define
_GNU_SOURCE in order to avoid a compiler warning about a missing
declaration.
2021-04-27 16:59:35 +01:00
Emmanuele Bassi
0bbb9de806 Disable deprecation warnings from librsvg
This is a test utility, we don't really care about deprecations.
2021-04-27 16:54:22 +01:00