[mutter] cogl: Remove cogl_get_option_group



commit 20bfd10f0c51847aee4f4eebbc1ebc98c4a4aa9e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Mar 30 15:46:05 2022 -0300

    cogl: Remove cogl_get_option_group
    
    It's unused.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355>

 cogl/cogl/cogl-debug.c    | 64 -----------------------------------------------
 cogl/cogl/cogl1-context.h | 16 ------------
 2 files changed, 80 deletions(-)
---
diff --git a/cogl/cogl/cogl-debug.c b/cogl/cogl/cogl-debug.c
index 056d92ec3e..a033925c4a 100644
--- a/cogl/cogl/cogl-debug.c
+++ b/cogl/cogl/cogl-debug.c
@@ -211,40 +211,6 @@ _cogl_parse_debug_string (const char *value,
     }
 }
 
-#ifdef COGL_ENABLE_DEBUG
-static gboolean
-cogl_arg_debug_cb (const char *key,
-                   const char *value,
-                   void *user_data)
-{
-  _cogl_parse_debug_string (value,
-                            TRUE /* enable the flags */,
-                            FALSE /* don't ignore help */);
-  return TRUE;
-}
-
-static gboolean
-cogl_arg_no_debug_cb (const char *key,
-                      const char *value,
-                      void *user_data)
-{
-  _cogl_parse_debug_string (value,
-                            FALSE, /* disable the flags */
-                            TRUE /* ignore help */);
-  return TRUE;
-}
-#endif /* COGL_ENABLE_DEBUG */
-
-static GOptionEntry cogl_args[] = {
-#ifdef COGL_ENABLE_DEBUG
-  { "cogl-debug", 0, 0, G_OPTION_ARG_CALLBACK, cogl_arg_debug_cb,
-    N_("Cogl debugging flags to set"), "FLAGS" },
-  { "cogl-no-debug", 0, 0, G_OPTION_ARG_CALLBACK, cogl_arg_no_debug_cb,
-    N_("Cogl debugging flags to unset"), "FLAGS" },
-#endif /* COGL_ENABLE_DEBUG */
-  { NULL, },
-};
-
 void
 _cogl_debug_check_environment (void)
 {
@@ -268,33 +234,3 @@ _cogl_debug_check_environment (void)
       env_string = NULL;
     }
 }
-
-static gboolean
-pre_parse_hook (GOptionContext *context,
-                GOptionGroup *group,
-                void *data,
-                GError **error)
-{
-  _cogl_init ();
-
-  return TRUE;
-}
-
-/* XXX: GOption based library initialization is not reliable because the
- * GOption API has no way to represent dependencies between libraries.
- */
-GOptionGroup *
-cogl_get_option_group (void)
-{
-  GOptionGroup *group;
-
-  group = g_option_group_new ("cogl",
-                              _("Cogl Options"),
-                              _("Show Cogl options"),
-                              NULL, NULL);
-
-  g_option_group_set_parse_hooks (group, pre_parse_hook, NULL);
-  g_option_group_add_entries (group, cogl_args);
-
-  return group;
-}
diff --git a/cogl/cogl/cogl1-context.h b/cogl/cogl/cogl1-context.h
index b36c3e7312..7925ed7ac0 100644
--- a/cogl/cogl/cogl1-context.h
+++ b/cogl/cogl/cogl1-context.h
@@ -44,22 +44,6 @@
 
 G_BEGIN_DECLS
 
-/**
- * cogl_get_option_group:
- *
- * Retrieves the #GOptionGroup used by Cogl to parse the command
- * line options. Clutter uses this to handle the Cogl command line
- * options during its initialization process.
- *
- * Return value: a #GOptionGroup
- *
- * Since: 1.0
- * Deprecated: 1.16: Not replaced
- */
-COGL_DEPRECATED
-COGL_EXPORT GOptionGroup *
-cogl_get_option_group (void);
-
 /* Misc */
 /**
  * cogl_get_proc_address: (skip)


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