[gnome-photos/wip/rishi/tests-gegl-zoom-in: 3/6] gegl: Add a version comparison macro for Babl
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/tests-gegl-zoom-in: 3/6] gegl: Add a version comparison macro for Babl
- Date: Wed, 1 Apr 2020 16:06:30 +0000 (UTC)
commit 92bf5185cd6a804616cd94ee0acfac41de0d6f7d
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Mar 31 18:33:54 2020 +0200
gegl: Add a version comparison macro for Babl
The SHA256 checksum of a GeglBuffer can be affected by changes in Babl
that alter the accuracy of the values generated by GEGL. These changes
are usually improvements to the existing fast paths in Babl, or the
addition or removal of fast paths; and the difference in the accuracy
of the values is too small to be perceived by the human eye, while the
performance benefits are significant.
Therefore, to avoid spurious failures, the test suite needs to support
multiple reference checksum strings - sometimes specific to a
particular Babl version. A subsequent commit will use this version
comparison macro to do so.
https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/126
src/photos-gegl.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-gegl.h b/src/photos-gegl.h
index cd533a97..20ec4e91 100644
--- a/src/photos-gegl.h
+++ b/src/photos-gegl.h
@@ -1,6 +1,6 @@
/*
* Photos - access, organize and share your photos on GNOME
- * Copyright © 2013 – 2019 Red Hat, Inc.
+ * Copyright © 2013 – 2020 Red Hat, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,6 +27,11 @@
G_BEGIN_DECLS
+#define PHOTOS_GEGL_BABL_CHECK_VERSION(major, minor, micro) \
+ (BABL_MAJOR_VERSION > (major) \
+ || (BABL_MAJOR_VERSION == (major) && BABL_MINOR_VERSION > (minor)) \
+ || (BABL_MAJOR_VERSION == (major) && BABL_MINOR_VERSION == (minor) && BABL_MICRO_VERSION >= (micro)))
+
GeglBuffer *photos_gegl_buffer_apply_orientation (GeglBuffer *buffer_original, GQuark orientation);
GeglBuffer *photos_gegl_buffer_convert (GeglBuffer *buffer_original, const Babl *format);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]