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>
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.)
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>
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>
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.
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().
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.