[mutter/gbsneto/tracing-fixups: 2/2] backend: Conditionally compile MetaProfiler
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/tracing-fixups: 2/2] backend: Conditionally compile MetaProfiler
- Date: Fri, 31 May 2019 15:54:49 +0000 (UTC)
commit 57945a730f39113a23794896b98dd75880edec11
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 31 12:50:14 2019 -0300
backend: Conditionally compile MetaProfiler
MetaProfiler is not built when -Dprofiler=false, and that
breaks the build since MetaBackend unconditionally imports
and uses it.
Fix that by wrapping MetaProfiler in compile-time checks.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/603
src/backends/meta-backend.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index e6db720f2..3864e34a4 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -64,9 +64,12 @@
#include "clutter/clutter-mutter.h"
#include "meta/main.h"
#include "meta/meta-backend.h"
-#include "backends/meta-profiler.h"
#include "meta/util.h"
+#ifdef HAVE_PROFILER
+#include "backends/meta-profiler.h"
+#endif
+
#ifdef HAVE_REMOTE_DESKTOP
#include "backends/meta-dbus-session-watcher.h"
#include "backends/meta-remote-access-controller-private.h"
@@ -127,7 +130,10 @@ struct _MetaBackendPrivate
MetaScreenCast *screen_cast;
MetaRemoteDesktop *remote_desktop;
#endif
+
+#ifdef HAVE_PROFILER
MetaProfiler *profiler;
+#endif
ClutterBackend *clutter_backend;
ClutterActor *stage;
@@ -194,7 +200,10 @@ meta_backend_finalize (GObject *object)
g_hash_table_destroy (priv->device_monitors);
g_clear_object (&priv->settings);
+
+#ifdef HAVE_PROFILER
g_clear_object (&priv->profiler);
+#endif
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
}
@@ -844,7 +853,9 @@ meta_backend_initable_init (GInitable *initable,
system_bus_gotten_cb,
backend);
+#ifdef HAVE_PROFILER
priv->profiler = meta_profiler_new ();
+#endif
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]