Commit graph

210 commits

Author SHA1 Message Date
Emmanuele Bassi
76c7f5edcf build: Use subdir-objects
We are referencing objects in sub-directories, which means we need to
tell Automake about that.
2021-05-11 15:34:19 +01:00
Uli Schlachter
57068e62a5 Use the serial automake test harness
Once upon a time, automake had one way to run tests. Apparently this is
(nowadays?) called the serial test harness. Then, in some release (I do
not remember which one), the parallel test harness became the default.

The parallel harness runs all tests in parallel, but does not (really)
show the test output, but instead has output redirected to files. Sort
of. I did not find the result of my printf() anywhere.

The automake docs strongly discourage using the serial test harness [0],
but do not really say why. For cairo, I do not see problems:

We have some quick, small checks (e.g. is cairo_public used where needed
in the public headers). And then there is the big, heavy-weight test
suite (cairo-test-suite). Thus, running these things in parallel has
basically no benefits.

Additionally, cairo-test-suite takes really, really long. Not seeing any
output while it is running is annoying. Failing to find the output even
in files is bad.

Thus, since I do not see any benefits and only downsides to the parallel
test harness, this commit switches to the serial one.

[0]: https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-04 08:10:10 +01:00
Tim-Philipp Müller
e30259f623 cairo-trace: fix build with newer versions of bfd
And update configure/meson checks to check for the new function.

Drop libiberty.h check since it's only needed by backtrace-symbols.c
which we're about to remove.

Closes #391, #460
2021-02-23 12:29:58 +00:00
Uli Schlachter
76aed3a5e3 Merge branch 'fix-autoconf' into 'master'
Fix autoconf warnings for version 2.70

See merge request cairo/cairo!113
2021-01-21 16:39:15 +00:00
Uli Schlachter
d909a7392c Merge branch 'use_correct_variable' into 'master'
Replace $have_png with $use_png

See merge request cairo/cairo!88
2021-01-19 16:34:49 +00:00
Heiko Lewin
f0873222ef Fix autoconf warnings for version 2.70 2021-01-18 17:55:04 +01:00
Uli Schlachter
f271715f37 Replace $have_png with $use_png
The remaining code in configure.ac also uses this variable.

Reported-at: 81102cc214 (note_201221)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-12-19 11:24:46 +01:00
Uli Schlachter
a012540d99 autoconf: Reject --enable-xml --disable-png
The xml surface depends on png. Before this commit, configuring with
autogen.sh --disable-png --disable-svg --enable-xml resulted in a
failing build:

src/cairo-xml-surface.c: In function ‘_cairo_xml_emit_image’:
src/cairo-xml-surface.c:673:14: error: implicit declaration of function
‘cairo_surface_write_to_png_stream’

After this commit, configure instead rejects this combination with:

checking whether cairo's xml surface backend feature could be enabled... no (requires --enable-png)
configure: error:  xml surface backend feature could not be enabled

Noticed-at: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/67#note_644347
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-12-19 11:10:13 +01: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
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
09092bf884 cogl: Add dependency on cogl-path
The path functions in the cogl API have now been split into a
separate one which builds from the same codebase. In order to
compile with this change, the new library has to be added as
an explicit dependency.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-08-25 02:30:57 -06:00
Mathieu Duponchelle
596a82f2d1 Add meson build definitions
Co-Authored by:
Nirbheek Chauhan <nirbheek@centricular.com>
lb90 <luca.bacci982@gmail.com>
Tim-Philipp Müller <tim@centricular.com>
2020-07-31 12:21:50 +01:00
Vasilij Schneidermann
81102cc214 Disable sphinx build if PNG support is disabled 2019-03-14 17:42:28 +00:00
Maarten Lankhorst
a34cb719cd Add support for RGBA128F and RGB96F formats.
IGT wants to add support for planes with a bit depth >10, which
requires a higher precision format than we have currently.

I'm using RGBA as format, because of its existence in OpenGL.
With the new formats we can directly convert our bytes to half float,
or multiply a colro vector with a matrix to go to the Y'CbCr colorspace.

This requires pixman 0.36.0, so bump the version requirement.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:10:44 -08:00
Bryce Harrington
7786b8fe4e Drop skia backend
Commit 38806bc3 already disabled the backend from use, now drop the
code.
2018-10-17 17:21:03 -07:00
Paul Menzel
f246a2144f Use HTTPS URLs for gnome.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*gnome.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}gnome\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:20 -07:00
Paul Menzel
1c9201721d Use HTTPS URLs for freedesktop.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:07 -07:00
Paul Menzel
15ad6ca3e1 Use HTTPS URLs for cairographics.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:01 -07:00
Bryce Harrington
9c7d5a49c6 gl: For glesv3 detection, use glesv2.pc + header check
There is no glesv3.pc provided by mesa, perhaps because
the glesv3 support is provided by the libGLESv2 library.
Don't bother testing for glesv3.pc, just check for glesv2.pc
and then search for the gl3.h header file.

This fixes an issue reported by Theo Veenker, where building
with glesv3 enabled would result in a cairo.pc file that depends
on the non-existant glesv3.pc.
2018-06-13 16:17:58 -07:00
Bryce Harrington
caf6f71d69 configure: Conditionalize color font feature for older freetype2
FT_HAS_COLOR() macro is unavailable in older freetype2 without the color
font feature.

Compile and link a source including FT_HAS_COLOR(); if it fails (which
can happen on older FreeType2) then define FT_HAS_COLOR(x) as (0).

Patch from suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2018-04-11 13:27:53 -07:00
Bryce Harrington
38806bc3c0 Disable skia from configure
Implement suggestion by Adrian Johnson to comment out skia in
configure.ac to avoid presenting it as an option to users.  This was
discussed on the Cairo mailing list in September 2017.

Skia is not API stable and is not available in packaged+versioned forms,
resulting in it being a continually moving target.  I.e. it's pretty
much always unusably out of date.  The last update to the skia backend
was in 2014, and had not been updated very regularly prior to that.

We'll simply disable it for now.  If no one complains by the next Cairo
snapshot release, we'll assume no one is needing it and will drop the
code entirely.

Meanwhile, if anyone does need it, it can be uncommented and used.

(The changes to the win32 build config appear to be automatically
generated as a result of disabling the feature in configure.  I'm
committing them to avoid confusion.)
2018-04-02 20:20:00 -07:00
Behdad Esfahbod
5795ac9d90 Fix compile with older FreeType without FT_Get_Var_Design_Coordinates 2018-01-15 19:28:56 -05:00
Behdad Esfahbod
c3659d7ef6 Use FT_Done_MM_Var() if available 2018-01-08 10:07:25 +00:00
Matthias Clasen
a8ae2eafc8 Use strtod_l when available
Using strtod_l and newlocale is a nicer way to have provide
a C-locale-only strtod. Since these APIs are not available
everywhere, keep the old code as a fallback.
2017-12-19 15:17:01 -05:00
Bryce Harrington
8d89fc573e configure: Check for typeof
Check via the AC_C_TYPEOF macro if GCC's typeof is available.  If it is
available via a different spelling, define typeof to that spelling.

Patch from and issue reported by Richard Palo.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93027
2017-11-06 11:35:24 -08:00
Bryce Harrington
8ff3019f51 gl: Add support for OpenGL ES 3.0
This improves the OpenGL ES support to extend it to version 3.0.
A number of new features are available in glesv3 including creation of
multi-sampled renderbuffers.  These renderbuffers can be blitted to
single sample textures (but not the other way around).  Other features
such as PBO for image uploading, are left as followon work.

For this preliminary implementation, glesv3 backends always create
renderbuffers, which can be set as single sample or multisample.  The
renderbuffer's content is blitted to the texture only when used as a
source or a mask.

Images uploaded to a texture stay there until the surface is used as a
rendering target, at which point its painted to the renderbuffer.

This patch is heavily based off of Henry Song's initial GLESv3 patch
6f7f3795 from his cairogles fork of Cairo, and incorporates subsequent
fixes and pertinent refactorings from his trunk and review feedback from
Uli.

This implements the *functional* support for glesv3, excluding the
various optimization work to utilize its features.  Rendering and
performance should not be expected to improve notably from pure glesv2.
As the GL backend for Cairo remains "experimental", these changes should
likewise be considered as such.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2017-09-13 15:18:04 -07:00
Olivier Blin
35a1761776 Pull -lz for the script backend
It uses cairo_deflate_stream.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Behdad Esfahbod <behdad.esfahbod@gmail.com>
2016-08-31 14:35:12 -07:00
Enrico Weigelt, metux IT consult
af42fc724e drm: fix importing of libdrm
We need to link against libdrm to use its functions.

Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-01-15 12:29:06 -08:00
Marc-André Lureau
fbb0a260b7 build-sys: do not try to build util/sphinx on Windows
glib and dlfcn exist on windows, but sphinx code uses a lot of
Unix-only API

Fixes the following build error on mingw-fedora

  CC     cairo-boilerplate-system.lo
../../../util/cairo-sphinx/sphinx.c:8:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=63043
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-09-24 12:20:53 -07:00
Ravi Nanjundappa
eab218d1e3 configure.ac: configuration check to enable either gl or glesv2, not both at the same time
A proposed solution for the discussion in
https://bugs.freedesktop.org/show_bug.cgi?id=57379#c12,
to avoid muliple definition of cairo_gl_* symbols when
both gl and glesv2 backends are enabled at the same time

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-08-21 12:34:10 -07:00
Bryce Harrington
2a37cbbabc configure.ac: Fix broken build for Qt backend
When --enable-qt is specified, the build will break due to missing
libstdc++:

  CCLD     cairo-test-suite
/usr/bin/ld: ../boilerplate/.libs/libcairoboilerplate.a(libcairoboilerplate_cxx_la-cairo-boilerplate-qt.o): undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

When using g++ to compile and link code, g++ automatically links
libstdc++.  However, in cairo we're using g++ only to compile, so need
to explicitly link against libstdc++ for backends that need iostream,
stl, or other stdc++ features.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59038
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-07-11 18:34:43 -07:00
Bryce Harrington
0f46fc8dc1 configure.ac: Quell warnings about AM_PROG_AR when using automake 1.12
Without this, autogen.sh issues warnings like:

  /usr/share/automake-1.14/am/ltlibrary.am: warning: 'libcairoboilerplate_cxx.la': linking libtool libraries using a non-POSIX
  /usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
  boilerplate/Makefile.am:18:   while processing Libtool library 'libcairoboilerplate_cxx.la'

AM_PROG_AR was introduced in automake 1.11.2.  As per the docs for
AM_PROG_AR, it is supposed to be included when the archiver ('ar') is
used, but prior to automake 1.12 the warning was only shown iff
-Wextra-portability was specified.  automake 1.12 introduced a change
that includes -Wextra-portability when -Wall is specified.

For further discussion of the issue, see:

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11401
  http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-07-11 18:34:43 -07:00
Behdad Esfahbod
4cb220773d chmod a+x cairo-trace 2014-07-11 11:07:25 -04:00
Ravi Nanjundappa
7bd68b5799 skia: update the source to build with the latest skia
This fixes several build related issues for the skia backend
which is introduced due to skia source up-gradation.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-07-08 11:09:04 -07:00
Bryce Harrington
1b522f81e2 test: Replace deprecated rsvg_init() in any2ppm test
As of libsvg 2.35 calling g_type_init() is sufficient.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31 11:25:32 -08:00
Behdad Esfahbod
040a9f678b Check for XRenderSolidFill() 2013-12-16 19:27:38 -05:00
Uli Schlachter
a8a805b8d9 cairo-gobject: Require at least glib 2.14
cairo-gobject uses g_once_init_enter() and g_once_init_leave(). These functions
were added in glib 2.14 and thus cairo needs at least this version for its
gobject helper functions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69239
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-16 12:55:01 +02:00
Adrian Johnson
8e1a1ed863 Downscaling requires pixman 0.30 2013-09-06 07:54:28 +09:30
Chris Wilson
054f34111d Provide backwards compatibilty with old pixman
The goal is to allow compilation against older pixman to ease regression
testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23 12:53:27 +01:00
Chris Wilson
b9f0ef4496 perf: Rescale the histogram for the terminal
If running ./cairo-perf-print in a terminal, query the terminal size and
rescale the histogram to use the maximum available space.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11 11:47:24 +01:00
Chris Wilson
74a19c527c configure: Include X11.h before testing for usability of Xrender.h
On Solaris at least, the Xrender.h header is not standalone and requires
X11/X.h to be included first to define the essential types.

Reported-by: Andreas F. Borchert <bugzilla@andreas-borchert.de>
Bugzilla; https://bugs.freedesktop.org/show_bug.cgi?id=58199
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29 10:31:05 +00:00
Chris Wilson
45a4b42a36 script: Recompress strings using LZO whilst binding traces
Try using the lighter-weight LZO decompressor in an effort to speed up
replays (at the cost of making the bound traces slightly larger).
Presuming that with the slight increase in file size (from -1% to +10%),
the file data remains in the readahead buffer cache, replays see a
performance improvement of between 5-10%.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-05 21:10:35 +00:00
Behdad Esfahbod
1404ed9692 [ft] Remove ancient check for FT_Bitmap_Size.y_ppem
That member is available in the version of FreeType we require.
2012-12-21 18:47:10 -05:00
Chris Wilson
0e24586978 xlib/shm: Use shmstr.h instead of shmproto.h if available
Before it was known as shmproto.h, the wire protocol definition was to
be found in shmstr.h, so if we don't have the current version of libXext
try to use the older includes.

Reported-by: Sebastian Haas <sehaas@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-28 10:13:04 +00:00
Chris Wilson
f18199fcfb xlib/shm: Check for XShm headers
Not all version of libXext ship the same set of headers, so play safe
and check during configure that we have the headers we depend upon in
the code.

Reported-by: Sebastian Haas <sehaas@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-28 10:13:04 +00:00
Gilles Espinasse
b12a94b983 configure: fix PKG_CHECK_MODULES tests displaying no no
Inside PKG_CHECK_MODULES, AC_MSG_RESULT(no) is already displayed, so the
caller should not use another AC_MSG_RESULT(no).

Add a comment that empty ACTION-IF-NOT-FOUND is not allowed for
PKG_CHECK_MODULES, but a simple : is enough.

This is bugs.freedesktop.org #51628, rediffed after 1.12.4

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-21 09:36:28 +01:00
Gilles Espinasse
813143c220 ft: Fix compilation on 1.12 without FT_Get_X11_Font_Format
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-21 09:34:08 +01:00
Chris Wilson
5041b462d0 xlib/shm: Sync the XShmAttach before removing the ShmSegment id
Whilst reading through other users of XShm, it became apparent that
IPC_RMID behaves differently across the platforms. Linux allows
processes to attach to an existing ShmSegment id after a IPC_RMID, but
for others the IPC_RMID takes immediate effect. On those platforms
without a "deferred" IPC_RMID, we then need to perform the XShmAttach
synchronously before perfomring the IPC_RMID.

Reported-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-19 12:04:50 +01:00
Chris Wilson
7266d59ebc configure: Restore previous pixman required version of 0.22.0
With optional compile time support for pixman glyphs, our hard pixman
requirement is then just 0.22.0 for the radial fixes (iirc).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-17 15:31:07 +01:00
Chris Wilson
0bfd2acd35 xlib: Implement SHM fallbacks and fast upload paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-17 13:58:09 +01:00