Commit graph

11763 commits

Author SHA1 Message Date
Xavier Claessens
ebbaebdec1 meson: Generate cairo-script-interpreter.pc needed by GTK+ 2020-12-22 13:16:05 -05:00
Uli Schlachter
7b258a2fb8 Merge branch 'libversion-fixup-match-autotools' into 'master'
meson: fix library versioning

Closes #442

See merge request cairo/cairo!84
2020-12-15 15:17:39 +00:00
Tim-Philipp Müller
e9ccb1d8d0 meson: fix library versioning
Fixes #442
2020-12-15 00:22:37 +00:00
Uli Schlachter
e22d7212ac Merge branch 'bigsur-use-after-free' into 'master'
Ref and destroy the cairo surface handed off to CoreGraphics.

Closes #420

See merge request cairo/cairo!52
2020-12-11 14:14:24 +00:00
John Ralls
dccaa9179b Quartz Better manage acquired/replayed surface. 2020-12-05 11:51:17 -08:00
John Ralls
1ddfccca31 Quartz image drawing: Remove containers for cairo_surface_t.
Since we now copy the data that CGImage needs we don't need to
keep the surface around anymore, nor release it or the image in the
DataProviderReleaseCallback.
2020-12-03 13:56:50 -08:00
John Ralls
b5e84a9783 Quartz: Ensure that image data and surface are available to draw.
Snapshot the cairo_surface_t and copy the image data to provide to
the CGDataProvider so that it is independent of the cairo_surface_t's
lifetime.

Closes https://gitlab.freedesktop.org/cairo/cairo/-/issues/420
2020-12-03 10:59:04 -08:00
John Ralls
32c12c617a Ensure _cairo_quartz_surface_create_internal always nulls imageSurfaceEquiv. 2020-11-30 14:10:18 -08:00
Uli Schlachter
f7054c892e Merge branch 'meson-ci-fix' into 'master'
ci: fix default options in meson ci

See merge request cairo/cairo!80
2020-11-22 19:08:41 +00:00
Tim-Philipp Müller
313f6fefc9 ci: fix default options in meson ci
Follow-up fix to !78
2020-11-22 18:44:20 +00:00
Uli Schlachter
6a713391fa Merge branch 'pdf-leak' into 'master'
pdf: fix leak of source surfaces

See merge request cairo/cairo!51
2020-11-21 13:48:13 +00:00
Félix Poisot
8913b6e2fc The array introduced in bff47b43 isn't cleared on surface finish 2020-11-21 11:58:59 +00:00
Uli Schlachter
577477207a Merge branch 'trace_parse_fix' into 'master'
cairo-trace: Fix escape character encoding in string literals

See merge request cairo/cairo!72
2020-11-20 16:38:31 +00:00
George Matsumura
08c76f4cbf cairo-trace: Fix escape character encoding in string literals
This fixes a typo wherein both a return character and a tab character
were encoded when only a return character was specified for encoding.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-11-20 16:07:53 +00:00
Uli Schlachter
c1d489b474 Merge branch 'empty-delta-arrays' into 'master'
cff: Allow empty array of operands for certain operators

See merge request cairo/cairo!39
2020-11-20 16:07:27 +00:00
Marek Kasik
c86b90a019 cff: Allow empty array of operands for certain operators
Operators BlueValues, OtherBlues, FamilyBlues, FamilyOtherBlues,
StemSnapH and StemSnapV have operands of type delta which can be
a number or an array of delta-encoded numbers. This array can be
empty according to freetype developers.
This commit checks whether current operator is among those listed
and permits empty operand in such case.
2020-11-20 15:39:54 +00:00
Uli Schlachter
e3415a319d Merge branch 'fix-iso8601_to_pdf_date_string' into 'master'
Fix conversion from ISO 8601 to PDF date string

Closes #392

See merge request cairo/cairo!35
2020-11-20 15:20:41 +00:00
Sven Neumann
6eb3c9d364 Fix conversion from ISO 8601 to PDF date string
The code used to unintentionally drop the minutes from the timezone
offset, see issue #392. This is now fixed.
2020-11-20 14:56:48 +00:00
Uli Schlachter
fda1f07bdf Merge branch 'meson-ci-require-gl-on-fedora' into 'master'
ci: require opengl in meson fedora build

See merge request cairo/cairo!79
2020-11-17 17:24:05 +00:00
Tim-Philipp Müller
5d97c12859 ci: require opengl in meson fedora build
Follow-up to !78
2020-11-17 16:59:53 +00:00
Tim-Philipp Müller
3e5115fde7 meson: align gl backend option defaults with autotools
Disable gl backend by default, just like autotools does:

  --enable-gl=[no/auto/yes]
                          Enable cairo's OpenGL surface backend feature
                          [default=no]
  --enable-glesv2=[no/auto/yes]
                          Enable cairo's OpenGLESv2 surface backend feature
                          [default=no]
  --enable-glesv3=[no/auto/yes]
                          Enable cairo's OpenGLESv3 surface backend feature
                          [default=no]
2020-11-17 15:13:42 +00:00
Nirbheek Chauhan
1a68c0bdfb libpng.wrap: Bump to latest version 2020-11-16 20:14:18 +05:30
Anton Danilkin
b5175fd8a6 Fix testing in the full mode for PDF, PS and SVG backends
Fix how offset, scale and transparency are handled.

Also do the same change in the "win32-printing" backend as it has a copy of the code from PDS, PS and SVG backends.
2020-11-13 12:04:51 +00:00
Nirbheek Chauhan
ab7b45feb7 meson: Fix libpng fallback dependency variable
The libpng subproject dependency variable name was wrong. It's
libpng_dep:

https://github.com/mesonbuild/libpng/blob/1.6.37/meson.build#L110
2020-11-10 16:18:50 +05:30
George Matsumura
ed98414686 build: Fix various compiler warnings
This fixes a few compiler warnings that were encountered with gcc 9.3.0.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-11-07 06:45:01 -07:00
Nirbheek Chauhan
618b13c436 meson: Add dependencies to the declared libcairo dep
That way when other projects consume our declared dep, they get
transitive dependencies too based on what features cairo was built
with. Without this, projects that build cairo as a subproject and also
build, say, fontconfig as a subproject will fail to find cairo-ft.h
(etc).
2020-11-04 14:50:52 +05:30
Tim-Philipp Müller
c3e48e63a2 meson: extract meson version from cairo-version.h
Same as autotools does. Arguably it would be better to do
it the other way round and generate cairo-version.h from
the version in meson.build or configure.ac but for now
let's do this so it's at least in sync with the autotools
build and only one file has to be edited for releases.
2020-10-21 11:45:54 +00:00
Michal Sudolsky
a67735010d fix double free and failed assertions in cairo_scaled_font_destroy 2020-10-21 11:14:28 +00:00
Xavier Claessens
f896701502 meson: cairo-ft depends on fontconfig if available
cairo-ft.h includes fontconfig.h when CAIRO_HAS_FC_FONT is defined, so
it must appear in the pc file and the corresponding
declare_dependency(). This fix build issue in harfbuzz when cairo and
fontconfig are built as subproject.
2020-10-07 12:04:35 -04:00
Xavier Claessens
70c01fb9d1 cairo-gobject: Missing cairo include directories
When cairo is a subproject and application uses libcairogobject_dep, it
was missing include directories set in libcairo_dep.
2020-10-07 11:50:07 -04:00
Xavier Claessens
084404cd15 meson: Use pkgmod.generate() for all cairo pc files
Also override each dependency so they can be used when cairo is used as
subproject.
2020-10-06 10:58:04 -04:00
Xavier Claessens
e2c1b76d71 meson: Fix build when libpng is not found
trace-to-xml.c needs cairo-xml.h which is only available when
CAIRO_HAS_XML_SURFACE feature is built which is only available when both
zlib and png are found. CAIRO_HAS_INTERPRETER only requires zlib.
2020-10-03 22:42:56 -04:00
Xavier Claessens
6a6ab24759 meson: Fix cross build with Android NDK
Android NDK does not contain execinfo.h so malloc-stats.c cannot be
built.
2020-10-02 17:29:07 -04:00
Tim-Philipp Müller
4ea2991a40 Retire dummy cairo-version.h header to fix meson subproject build
It was originally added to make bisecting easier,
but has outlived its usefuleness now.

Going forward we'll have just a single cairo-version.h
header file, the one with the real version numbers.

This is needed to fix the case where cairo is being
built as a Meson subproject, but also simplifies
things in general.

Fixes #421
2020-09-29 15:50:53 +00:00
Jordan Petridis
96017adf65
port the CI setup to freedesktop/citemplates
rework the whole CI setup to take advantage of citemplates
for building managing the docker images.

also add a meson build job and rework the ccache config to be
shared across autotools and meson. The jobs will not share ccache
artifacts though.

https://who-t.blogspot.com/2020/03/its-templates-all-way-down.html
2020-09-29 13:00:39 +03:00
Tim-Philipp Müller
75f6e0cacf ci: add native Windows MSVC build with Meson 2020-09-26 23:38:26 +01:00
Tim-Philipp Müller
b4bbe9970c autotools: dist Meson build system files
So that people can build with Meson when using the tarballs.

Fixes #424
2020-09-24 12:16:39 +01:00
Tim-Philipp Müller
01683a5882 meson: ensure srcdir doesn't contain autotools build artifacts
.. such as config.h or other generated files such as cairo-features.h,
as those might be accidentally included by the meson build and cause
weird to debug build issues.

Fixes #423
2020-09-19 14:07:28 +01:00
George Matsumura
9a3ad1df1c build: Include correct poll.h
Including sys/poll.h when poll.h is available produces a compile
warning on some systems, but only sys/poll.h is present on others
such as AIX. This makes sure the most suitable poll.h is included
in each situation.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-09-05 12:15:57 +00:00
Uli Schlachter
3b1bf9d6d3 Fix/silence some warnings in 'make check'
'make check' currently fails with the following in src/test-suite.log
(how can one tell automake not to hide the error message in a file?!?):

FAIL: check-doc-syntax.sh
=========================

Checking documentation for incorrect syntax
./cairo-cogl-surface.c: * cairo_cogl_pipeline_ts. On failure, both pointers will be set to
./cairo-cogl-surface.c:/* Mostly taken from cairo_vg_surface.c */
Error: some function names in the docs are not followed by parentheses.
Fix this by searching for the following regexp in the above files:
	'^[^:]*:[/ ][*]\(\|[ 	].*\)\([^#']\|^\)\<\(cairo_[][<>/0-9a-z_]*\>[^][<>(]\)'
FAIL check-doc-syntax.sh (exit status: 1)

This commit silences that. The fix is likely not correct, but since
these are normal comments and not actual doc comments, it does not
matter much.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-09-05 08:57:23 +00:00
Uli Schlachter
881e2579f0 Make the test suite succeed on GitLab CI
This commit makes the test suite pass by simply ignoring failures. Not
pretty, but better than teaching people to just ignore CI failures. At
least some kinds of problems can still be caught.

Originally, I wanted to only run a single test, but while investigating
how to do this, I stumbled upon this undocumented environment variable.
This seems less ugly and might allow looking at older build logs to
figure out when something first broke.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-09-05 08:50:59 +00:00
George Matsumura
47881a965e cogl: Add build version requirement
This ensures that build configuration for the cogl backend will fail
if an insufficiently new version of cogl is present, making it easier
to find the root cause of a build failure.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-09-04 20:44:53 -06:00
George Matsumura
c8d82cffdf svg2png: Remove deprecated handle closing function call
rsvg_handle_close is no longer required after creating a handle with
rsvg_handle_new_from_file. It causes a deprecation warning during
compilation as well. This change removes it.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-09-02 10:29:04 +00:00
George Matsumura
f2cb9ba49a meson: Fix musl build
This constitutes few fixes that are necessary to compile correctly
and reduce errors when using musl libc.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-09-02 10:29:04 +00:00
Ting-Wei Lan
b87e53dc1c meson: Fix undefined reference when bfd library is installed
Add the missing file which is necessary when symbol lookup is enabled.
2020-08-31 23:20:49 +08:00
George Matsumura
2f39018c2c meson: Remove unconditional disable of cogl backend build 2020-08-25 03:26:27 -06:00
George Matsumura
e47d0de8d2 cogl: Remove filling with cogl-path
This removes code that uses the cogl-path library, which was not
used except when manually modifying a preprocessor flag. It could
not use path caching, was slightly broken, and all of its
functionality was provided better by different code paths.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-08-25 02:30:58 -06:00
George Matsumura
ecbd7ed174 cogl: Add new path cache
This redesigns the path cache so that it does not mess with the
context functions, thereby hopefully making it much more resilient
to changes in the rest of cairo that change the way the default
context works. It is also much simpler, and it is anticipated that
it will be more maintainable. Performance in contrast to the old
cache design speeds up most traces in cairo-perf-trace, and slows
down only a lesser few by <20%.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-08-25 02:30:58 -06:00
George Matsumura
939da43c44 cogl: Add minimal font support
This adds very basic path-based font support to the cogl backend,
improving cairo-perf-trace performance by 6x or more on many traces.
This still is not the most desirable form of font support, which
would resemble the texture-based glyph caching in the gl backend or
use cogl-pango to automatically cache glyphs.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-08-25 02:30:58 -06:00
George Matsumura
26c7103750 cogl: Fix reference counting bugs
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-08-25 02:30:58 -06:00