From 20bfd10f0c51847aee4f4eebbc1ebc98c4a4aa9e Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 30 Mar 2022 15:46:05 -0300 Subject: [PATCH] cogl: Remove cogl_get_option_group It's unused. Part-of: --- 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 056d92ec3..a033925c4 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 b36c3e731..7925ed7ac 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)