summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-05-18 16:24:45 +0200
committerJonas Ådahl <jadahl@gmail.com>2018-11-06 17:17:36 +0100
commit12171e413b2afad6e2cd494c03753637e0ff6406 (patch)
tree974d8d28e2a1827b64f67f7d0f14f22bb44201d1
parent99fb79f4cb5281349f715909435f1f16ccf378e4 (diff)
downloadmutter-12171e413b2afad6e2cd494c03753637e0ff6406.tar.gz
cogl: Unconditionally depend on cairo
-rw-r--r--cogl/cogl/cogl-rectangle-map.c12
-rw-r--r--cogl/configure.ac20
2 files changed, 5 insertions, 27 deletions
diff --git a/cogl/cogl/cogl-rectangle-map.c b/cogl/cogl/cogl-rectangle-map.c
index ef6b421d2..37eb089d2 100644
--- a/cogl/cogl/cogl-rectangle-map.c
+++ b/cogl/cogl/cogl-rectangle-map.c
@@ -48,7 +48,7 @@
http://www.blackpawn.com/texts/lightmaps/default.html
*/
-#if defined (COGL_ENABLE_DEBUG) && defined (HAVE_CAIRO)
+#ifdef COGL_ENABLE_DEBUG
/* The cairo header is only used for debugging to generate an image of
the atlas */
@@ -56,7 +56,7 @@
static void _cogl_rectangle_map_dump_image (CoglRectangleMap *map);
-#endif /* COGL_ENABLE_DEBUG && HAVE_CAIRO */
+#endif /* COGL_ENABLE_DEBUG */
typedef struct _CoglRectangleMapNode CoglRectangleMapNode;
typedef struct _CoglRectangleMapStackEntry CoglRectangleMapStackEntry;
@@ -464,9 +464,7 @@ _cogl_rectangle_map_add (CoglRectangleMap *map,
#ifdef COGL_ENABLE_DEBUG
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DUMP_ATLAS_IMAGE)))
{
-#ifdef HAVE_CAIRO
_cogl_rectangle_map_dump_image (map);
-#endif
/* Dumping the rectangle map is really slow so we might as well
verify the space remaining here as it is also quite slow */
_cogl_rectangle_map_verify (map);
@@ -557,9 +555,7 @@ _cogl_rectangle_map_remove (CoglRectangleMap *map,
#ifdef COGL_ENABLE_DEBUG
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DUMP_ATLAS_IMAGE)))
{
-#ifdef HAVE_CAIRO
_cogl_rectangle_map_dump_image (map);
-#endif
/* Dumping the rectangle map is really slow so we might as well
verify the space remaining here as it is also quite slow */
_cogl_rectangle_map_verify (map);
@@ -706,7 +702,7 @@ _cogl_rectangle_map_free (CoglRectangleMap *map)
g_free (map);
}
-#if defined (COGL_ENABLE_DEBUG) && defined (HAVE_CAIRO)
+#ifdef COGL_ENABLE_DEBUG
static void
_cogl_rectangle_map_dump_image_cb (CoglRectangleMapNode *node, void *data)
@@ -761,4 +757,4 @@ _cogl_rectangle_map_dump_image (CoglRectangleMap *map)
cairo_surface_destroy (surface);
}
-#endif /* COGL_ENABLE_DEBUG && HAVE_CAIRO */
+#endif /* COGL_ENABLE_DEBUG */
diff --git a/cogl/configure.ac b/cogl/configure.ac
index 6d1e39353..92ea712ac 100644
--- a/cogl/configure.ac
+++ b/cogl/configure.ac
@@ -148,25 +148,7 @@ dnl Enable cairo usage for debugging
dnl (debugging code can use cairo to dump the atlas)
dnl ============================================================
-PKG_CHECK_EXISTS([CAIRO], [cairo >= cairo_req_version], [have_cairo=yes])
-AC_ARG_ENABLE(
- [cairo],
- [AC_HELP_STRING([--enable-cairo=@<:@no/yes@:>@], [Control Cairo usage in Cogl debugging code @<:@default=auto@:>@])],
- [],
- [
- AS_IF([test "x$enable_debug" = "xyes"],
- [enable_cairo=$have_cairo],
- [enable_cairo=no])
- ]
-)
-AS_IF([test "x$enable_cairo" = "xyes" && test "x$enable_debug" = "xyes"],
- [
- AS_IF([test "x$have_cairo" != "xyes"],
- [AC_MSG_ERROR([Could not find Cairo])])
-
- COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo >= cairo_req_version"
- AC_DEFINE([HAVE_CAIRO], [1], [Whether we have cairo or not])
- ])
+COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo >= cairo_req_version"
dnl ============================================================