[cairo-commit] 5 commits - meson.build src/cairo-xml-surface.c test/cairo-test-trace.c util/cairo-gobject
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 27 16:30:46 UTC 2021
meson.build | 2 ++
src/cairo-xml-surface.c | 16 +++++++++-------
test/cairo-test-trace.c | 2 ++
util/cairo-gobject/cairo-gobject-structs.c | 2 +-
4 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit 64e1fd70ec065567d0082bbc98523825aaa0a817
Merge: 47770fc2b efab74f5a
Author: Uli Schlachter <psychon at znc.in>
Date: Tue Apr 27 16:30:44 2021 +0000
Merge branch 'ebassi/warnings-fixes' into 'master'
Avoid a bunch of compiler warnings
See merge request cairo/cairo!166
commit efab74f5a11ba2a5ececb5ffe48f5b86d945f3b7
Author: Emmanuele Bassi <ebassi at gnome.org>
Date: Sun Apr 18 11:07:38 2021 +0100
Drop volatile from the GType registration
The `volatile` is unnecessary, and newer versions of GLib and GCC will
complain if you use it.
diff --git a/util/cairo-gobject/cairo-gobject-structs.c b/util/cairo-gobject/cairo-gobject-structs.c
index 4bbf11baa..d4df207f4 100644
--- a/util/cairo-gobject/cairo-gobject-structs.c
+++ b/util/cairo-gobject/cairo-gobject-structs.c
@@ -44,7 +44,7 @@
GType \
underscore_name ## _get_type (void) \
{ \
- static volatile gsize type_volatile = 0; \
+ static gsize type_volatile = 0; \
if (g_once_init_enter (&type_volatile)) { \
GType type = g_boxed_type_register_static (g_intern_static_string (Name), \
(GBoxedCopyFunc)copy_func, \
commit 0f39b795754681120c06f760362554d7e2b5c753
Author: Emmanuele Bassi <ebassi at gnome.org>
Date: Sun Apr 18 11:12:42 2021 +0100
Define _GNU_SOURCE in order to use memmem
The memmem() function is a GNU extension, which means we need to define
_GNU_SOURCE in order to avoid a compiler warning about a missing
declaration.
diff --git a/meson.build b/meson.build
index 1e14b3286..d4f759224 100644
--- a/meson.build
+++ b/meson.build
@@ -43,6 +43,8 @@ if cc.get_id() == 'msvc'
language : 'c')
endif
+add_project_arguments('-D_GNU_SOURCE', language: 'c')
+
# Make sure source directory hasn't been configured with autotools
if meson.version().version_compare('>= 0.53')
fs = import('fs')
commit 966b4a4e5fb487a2400fcb2a62b51a7e93913489
Author: Emmanuele Bassi <ebassi at gnome.org>
Date: Sun Apr 18 11:17:38 2021 +0100
Handle new Cairo formats in test-trace
We are missing RGB96F and RGBA128F.
diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c
index 4eee5d30b..7ada3e75a 100644
--- a/test/cairo-test-trace.c
+++ b/test/cairo-test-trace.c
@@ -858,6 +858,8 @@ matches_reference (struct slave *slave)
case CAIRO_FORMAT_RGB30:
case CAIRO_FORMAT_RGB16_565:
+ case CAIRO_FORMAT_RGB96F:
+ case CAIRO_FORMAT_RGBA128F:
case CAIRO_FORMAT_INVALID:
assert (0);
}
commit 7027360c82f43fa5a84e55890d3fbaef49ba4764
Author: Emmanuele Bassi <ebassi at gnome.org>
Date: Sun Apr 18 11:06:52 2021 +0100
Handle new Cairo formats in the XML surface
We are missing RGB96F and RGBA128F.
diff --git a/src/cairo-xml-surface.c b/src/cairo-xml-surface.c
index 43cb6dddf..401a5b3c6 100644
--- a/src/cairo-xml-surface.c
+++ b/src/cairo-xml-surface.c
@@ -209,13 +209,15 @@ static const char *
_format_to_string (cairo_format_t format)
{
switch (format) {
- case CAIRO_FORMAT_ARGB32: return "ARGB32";
- case CAIRO_FORMAT_RGB30: return "RGB30";
- case CAIRO_FORMAT_RGB24: return "RGB24";
- case CAIRO_FORMAT_RGB16_565: return "RGB16_565";
- case CAIRO_FORMAT_A8: return "A8";
- case CAIRO_FORMAT_A1: return "A1";
- case CAIRO_FORMAT_INVALID: return "INVALID";
+ case CAIRO_FORMAT_ARGB32: return "ARGB32";
+ case CAIRO_FORMAT_RGB30: return "RGB30";
+ case CAIRO_FORMAT_RGB24: return "RGB24";
+ case CAIRO_FORMAT_RGB16_565: return "RGB16_565";
+ case CAIRO_FORMAT_RGB96F: return "RGB96F";
+ case CAIRO_FORMAT_RGBA128F: return "RGBA128F";
+ case CAIRO_FORMAT_A8: return "A8";
+ case CAIRO_FORMAT_A1: return "A1";
+ case CAIRO_FORMAT_INVALID: return "INVALID";
}
ASSERT_NOT_REACHED;
return "INVALID";
More information about the cairo-commit
mailing list