Commit graph

12046 commits

Author SHA1 Message Date
Adrian Johnson
ff2a95d6e5 Merge branch 'isxdigit' into 'master'
Create cairo version of isxdigit()

Closes #335

See merge request cairo/cairo!199
2021-07-18 07:31:16 +00:00
Adrian Johnson
30a0ae56d8 Create cairo version of isxdigit()
Fixes #335
2021-07-18 16:10:59 +09:30
Uli Schlachter
a6f7c20bef Merge branch 'windows-ci-fix' into 'master'
ci: add fallback_source_uri to work around ssl certificate issues on windows runners

See merge request cairo/cairo!198
2021-07-18 05:34:40 +00:00
Tim-Philipp Müller
b2a1525113 ci: add fallback_source_uri to work around ssl certificate issues on windows runners
Has to be fixed properly, possibly by regenerating the image, but
for now this might do the job.
2021-07-17 23:58:44 +01:00
Emmanuele Bassi
0eff09a1e3 Merge branch 'fix-fontconfig-subproject' into 'master'
Fix fontconfig subproject

See merge request cairo/cairo!193
2021-07-01 12:01:14 +00:00
Matthias Clasen
13660ff925 Fix fontconfig subproject
fontconfig has changed its default git branch from
master to main, and deleted the master branch. This
breaks GTK ci on MacOs, where we use build cairo and
use its fontconfig subproject.
2021-07-01 06:55:59 -04:00
Tim-Philipp Müller
716d144cbd Merge branch 'fix-meson-build' into 'master'
Fix the meson build

See merge request cairo/cairo!190
2021-06-18 13:09:54 +00:00
Uli Schlachter
edac5f66a0 Fix the meson build
I merged two MRs and broke the build:

- One MR added perf/ to the meson build
- The second MR changed lots of meson code to just dependency objects
  instead of just "messing" with include directories and library objects

The result was that perf/meson.build now referred to include objects and
library objects that no longer exist.

Fix this by also using dependency objects in perf/.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-17 17:03:10 +02:00
Uli Schlachter
dd1f8f00df Merge branch 'extra-test-steps' into 'master'
CI: Split test execution into per-backend jobs

See merge request cairo/cairo!188
2021-06-17 14:25:54 +00:00
Uli Schlachter
43a48fb6a5 Merge branch 'more-meson' into 'master'
Add more of the auto-foo build to meson

See merge request cairo/cairo!183
2021-06-17 14:25:16 +00:00
Uli Schlachter
987bbdd7bd Always run tests with an X11 server
This allows tests xcb-surface-source and xlib-surface-source to run.
Somehow I thought this would be more complicated...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-04 16:11:18 +02:00
Uli Schlachter
430168cc8f CI: Split test execution into per-backend jobs
This creates one job per cairo backend that is tested on CI. That
backend is then tested in its own job.

One motivation is that this will hopefully be faster, because tests are
run in parallel. Another motivation is that this lets us get around the
one hour time limit per job.

A downside is that the inter-backend tests are not run in CI. For
example, xlib-surface-source requires a working X11 server. I am not
providing that X11 server here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-04 09:08:41 +02:00
Uli Schlachter
07d6012185 Merge branch 'expected-failure-line-separated' into 'master'
Move test failure lists into separate files with one test name per line

See merge request cairo/cairo!187
2021-06-03 23:52:43 +00:00
Uli Schlachter
39db60e957 Merge branch 'build-without-zlib' into 'master'
meson: Use more dependency objects & fix build without zlib

Closes #475

See merge request cairo/cairo!184
2021-06-03 15:26:07 +00:00
Uli Schlachter
47c70d53e4 Switch to line-separated test failure lists
Having comma separated lists of test names that we expect to fail leads
to really unreadable and useless diffs. Thus, this commit changes these
lists to be separated by newlines. This change was generated with:

  ( cd .gitlab-ci ; for x in * ; do tr ',' '\n' < $x > .$x ; mv .$x $x ; done )

The code in .gitlab-ci.yml is changed to use tr again to transfer these
lists back so that everything still works.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:19:17 +02:00
Uli Schlachter
9c9883cac0 Rename a file
Because shell variables cannot contain &, this character was replaced
with an underscore in the shell variable. However, we can have this
character just fine in the file name. Thus, this commits renames a file
to actually include the proper name of the boilerplate target, which is
xcb-window&.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:13:57 +02:00
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
1e34651420 Fix meson build without zlib
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>
2021-05-22 08:16:47 +02:00
Uli Schlachter
1981fb6dfb meson: Use more dependency objects
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>
2021-05-22 07:59:52 +02: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
Uli Schlachter
339671c787 meson: Add perf/ directory
This adds the code under perf/ to meson. The only testing I did was "it
builds for me". I do not have gtk+2 installed and so I did not even try
whether that thing builds. Besides that, I mostly tried to stay close to
the autofoo build.
2021-05-15 10:53:08 +02:00
Uli Schlachter
1c5b4716f7 meson: Add shell script tests
There are a couple of shell scripts in src/ that run various tests. This
commit adds them to the meson build.

The one exception is check-def.sh, which I couldn't get to work and thus
only add it commented out.

check-headers.sh and check-plt.sh required some tweaking to get them to
work. check-plt.sh will print an error when run since the file
'.libs/lib*.so' does not exist, but it will still run its check
correctly.
2021-05-14 17:08:02 +02: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