Commit graph

12113 commits

Author SHA1 Message Date
Anton Danilkin
898021ba39 Simplify _cairo_hash_table_size 2021-04-24 14:36:14 +02:00
afdw
0cc63f5d49 Merge branch 'master' into 'svg-backend-work'
# Conflicts:
#   src/cairo-malloc-private.h
#   src/cairo-svg-surface.c
2021-04-24 12:30:44 +00:00
Uli Schlachter
de2a71b230 Merge branch 'svg-ci' into 'master'
Enable SVG in CI

See merge request cairo/cairo!156
2021-04-23 19:40:46 +00:00
Uli Schlachter
2d2f73bc3c Run the test suite on MacOS
This adds the necessary commands to run the test suite on MacOS in CI
and to also ignore the current failures.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-22 16:14:37 +02:00
Heiko Lewin
ec2933b06e Merge branch 'wip/Jehan/subpixel-antialiasing' into 'master'
src: do not override explicitly requested grayscale antialiasing.

See merge request cairo/cairo!114
2021-04-20 12:35:17 +00:00
Tim-Philipp Müller
d4617e31be Merge branch 'no-fontconfig-on-windows' into 'master'
Don't build fontconfig on Windows

See merge request cairo/cairo!159
2021-04-20 10:33:20 +00:00
Matthias Clasen
f6a3f6d8ad Don't build fontconfig on Windows
mesons 'auto' is too eager to build things. Building
fontconfig as a subproject on Windows is not the right
thing, unless it was explictly requested.
2021-04-19 11:49:31 -04:00
Uli Schlachter
0392dd783c Ignore create-for-stream failure with svg
The create-for-stream test verifies that writing something to a file and
writing it to an in-memory surface produces the same output. The test
currently fails when the svg backend is tested with:

TEST: create_for_stream TARGET: pdf RESULT: PASS
svg: Stream based output differ from file output for output/create-for-stream.out.svg.
TEST: create_for_stream TARGET: svg RESULT: FAIL

I guess this is because svg uses unique IDs for surfaces, meaning that
drawing two times the same thing in the same process can produce
different outputs. However, this is just a guess and I didn't
investigate further.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 13:00:07 +02:00
Uli Schlachter
2f8b5bc7b2 Add hack to ignore a svg test crashes
This adds a special hack to the test suite to ignore the crashes for
self-copy and self-copy-overlap for the svg backend in CI.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 12:25:13 +02:00
Uli Schlachter
0c9dacbc43 svg: Reject raster sources
This hopefully fixes the raster-source test case crashing:

cairo-svg-surface.c:2269: _cairo_svg_surface_emit_pattern: Assertion `!"reached"' failed.

I cannot / did not test this change locally and rely on CI to tell me
whether this works.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 09:32:44 +02:00
Uli Schlachter
9ea171b132 Ignore current svg failures in CI
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 08:40:17 +02:00
Uli Schlachter
ca3423a701 Install gtk2-devel on CI
From config.log from CI:

configure:27855: $PKG_CONFIG --exists --print-errors "$librsvg_DEPENDENCY gdk-2.0"
Package gdk-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdk-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gdk-2.0', required by 'virtual:world', not found
configure:27858: $? = 1
Package 'gdk-2.0', required by 'virtual:world', not found
configure:27885: result: no
configure:27921: WARNING: SVG backend will not be tested since librsvg >= 2.35.0 is not available

According to Google, it seems like gtk2-devel is the right package to
get gdk-2.0.pc.

Thanks a lot to @tpm for explaining that I also have to change the TAG
variable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 08:18:49 +02:00
Uli Schlachter
f8157ae751 Add config.log to build artefacts
This fail is not large, so doesn't "cost much", but it helps in figuring
out build problems in CI like "what exactly is missing for the SVG
backend?".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-18 08:01:09 +02:00
Heiko Lewin
7de7d57592 Merge branch 'ci-make-test-succeeds' into 'master'
CI: Actually run cairo-test-suite

See merge request cairo/cairo!140
2021-04-17 10:01:17 +00:00
Uli Schlachter
a31c7395a1 test-suite: Add a new mechanism for XFAILs
This commit adds a new mechanism to mark tests as expected to fail via
an environment variable. For example, if you expect the tests "foo" and
"bar" to fail when run under image.argb32, you would set

   CAIRO_TEST_IGNORE_image_argb32=foo,bar

The test suite then expects these tests to fail and treats this as
xfail. If they do not fail, this is a failure on its own.

This new feature is explicitly not documented much, because it is only
used as a stopgap measure to make our CI more useful: Right now the test
suite runs on CI, but the result is ignored. This new feature allows to
mark the known failures as xfail without too much work. When the
situation changes, this will be noticed as a new test suite failure.
Thus, these environment variables to not run into the danger of still
containing tests that were already fixed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-17 10:01:17 +00:00
Uli Schlachter
dfd543d013 Merge branch 'fix-cairo-malloc' into 'master'
Change int to size_t in the _cairo_malloc function family

See merge request cairo/cairo!153
2021-04-17 07:06:06 +00:00
Anton Danilkin
9f44a2a1b6 Add a small padding around paints 2021-04-13 20:58:57 +02:00
Anton Danilkin
67099a091e Change int to size_t in the _cairo_malloc function family
This should allow to use them for allocating large amounts of memory.

Also use explicit checks for zeros to not make the compiler think that it is a boolean context.
2021-04-13 19:20:05 +02:00
Anton Danilkin
43a602b185 Skip the color to alpha filter when possible 2021-04-13 18:31:23 +02:00
Anton Danilkin
69d90f3e62 Implement attempting to recognize a common pattern for a bitmap font and extract the original glyph image from it 2021-04-13 18:03:40 +02:00
Anton Danilkin
982c37f544 Fix warnings and pipeline failure 2021-04-13 12:26:16 +02:00
Anton Danilkin
3cb6377c08 Revert "Fix filter being used on the use element causing the content to be clipped"
This reverts commit 2a8672d06e.
2021-04-13 04:31:07 +02:00
Anton Danilkin
90aa943555 Add support for PDF Type 3 fonts 2021-04-13 04:31:07 +02:00
Anton Danilkin
1c1bceb581 Emit bitmap glyph data as images instead of as a bunch of squares, as this results in smaller file size and better quality, allowing the use of shades of gray 2021-04-13 04:31:07 +02:00
Anton Danilkin
1fe3c55712 Do not emit empty glyph paths 2021-04-12 18:49:03 +02:00
Anton Danilkin
2a8672d06e Fix filter being used on the use element causing the content to be clipped 2021-04-12 11:55:56 +02:00
Tim-Philipp Müller
c287fb3a1f Merge branch 'win32-atomic' into 'master'
atomic: Add support for WIN32 atomic operations

See merge request cairo/cairo!151
2021-04-12 08:30:57 +00:00
Anton Danilkin
87d5c9e8d1 Add missing include 2021-04-12 00:17:51 +02:00
Anton Danilkin
5932084df3 Remove _cairo_memory_stream_to_string 2021-04-12 00:00:45 +02:00
Anton Danilkin
917f366ad1 Add a test for #431 2021-04-11 23:59:47 +02:00
Anton Danilkin
39dabd34fe Mark CAIRO_PATTERN_TYPE_MESH as unsupported and impose a limit on recording surfaces depth 2021-04-11 23:59:47 +02:00
Anton Danilkin
c91afd777a Do not use parent_matrix in the mask operation 2021-04-11 23:59:47 +02:00
Anton Danilkin
d44bb67c7f Fix clip-rule being emitted on the wrong elements 2021-04-11 23:59:47 +02:00
Anton Danilkin
580e9b9be6 Add my name to the header of cairo-svg-surface.c 2021-04-11 23:59:47 +02:00
Anton Danilkin
500b39e98f Move cairo_svg_surface_t to cairo-svg-surface.c 2021-04-11 23:59:47 +02:00
Anton Danilkin
ceae137ba6 Finish implementing correct paints in transformed recording patterns 2021-04-11 23:59:47 +02:00
Anton Danilkin
c5b24a3e12 Start implementing correct paints in transformed recording patterns 2021-04-11 23:59:47 +02:00
Anton Danilkin
c2ea2848fd Simplify _cairo_svg_surface_emit_composite_surface_pattern 2021-04-11 23:59:47 +02:00
Anton Danilkin
89eda6f650 Simplify ignoring of statuses 2021-04-11 23:59:47 +02:00
Anton Danilkin
cf0023d7ce Simplify SVG document generation 2021-04-11 23:59:47 +02:00
Anton Danilkin
733c38b9f4 Fix and clarify _cairo_svg_surface_do_operator 2021-04-11 23:59:47 +02:00
Anton Danilkin
b5baac736f Do not create temporary single-color patterns. Also, do not try to support CAIRO_CONTENT_COLOR 2021-04-11 23:59:47 +02:00
Anton Danilkin
d88ac55b9f Remove SVG 1.2 and CAIRO_CONTENT_COLOR SVG boilerplate targets 2021-04-11 23:59:47 +02:00
Anton Danilkin
9ac707374f Fix problems with radial gradients 2021-04-11 23:59:47 +02:00
Anton Danilkin
d397ab6d10 Change the default SVG unit to user unit 2021-04-11 23:59:47 +02:00
Anton Danilkin
f85834a1f5 Do not use the style attribute 2021-04-11 23:59:47 +02:00
Anton Danilkin
71eef9c8bc Implement the rest of the operators 2021-04-11 23:59:47 +02:00
Anton Danilkin
0df89ca8d8 Implement most of the non-blending operators 2021-04-11 23:59:47 +02:00
Anton Danilkin
e728eb43de Implement the in operator 2021-04-11 23:59:47 +02:00
Anton Danilkin
961db5b846 Implement operators for the rest of operations 2021-04-11 23:59:47 +02:00