[mutter] cogl: Unconditionally depend on cairo



commit 12171e413b2afad6e2cd494c03753637e0ff6406
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri May 18 16:24:45 2018 +0200

    cogl: Unconditionally depend on cairo

 cogl/cogl/cogl-rectangle-map.c | 12 ++++--------
 cogl/configure.ac              | 20 +-------------------
 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     ============================================================


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]