From 4263db65e35af40bfe819d5aa1d913cf3d42258a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 10 Aug 2023 15:48:04 +0200 Subject: [PATCH] Remove unused clutter_set_allowed_drivers Unused since d1c62d882ab8 ("clutter: Do not read settings from ini file"). Part-of: --- clutter/clutter/clutter-backend-private.h | 2 -- clutter/clutter/clutter-backend.c | 28 ++--------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/clutter/clutter/clutter-backend-private.h b/clutter/clutter/clutter-backend-private.h index da30123da..d5f2898da 100644 --- a/clutter/clutter/clutter-backend-private.h +++ b/clutter/clutter/clutter-backend-private.h @@ -102,8 +102,6 @@ gfloat _clutter_backend_get_units_per_em (Clutter PangoFontDescription *font_desc); gint32 _clutter_backend_get_units_serial (ClutterBackend *backend); -void clutter_set_allowed_drivers (const char *drivers); - CLUTTER_EXPORT ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend); diff --git a/clutter/clutter/clutter-backend.c b/clutter/clutter/clutter-backend.c index bf2639e5f..fe5c61558 100644 --- a/clutter/clutter/clutter-backend.c +++ b/clutter/clutter/clutter-backend.c @@ -287,8 +287,6 @@ static const struct { { "any", "Default Cogl driver", COGL_DRIVER_ANY }, }; -static const char *allowed_drivers; - static gboolean clutter_backend_real_create_context (ClutterBackend *backend, GError **error) @@ -296,20 +294,14 @@ clutter_backend_real_create_context (ClutterBackend *backend, GError *internal_error = NULL; const char *drivers_list; char **known_drivers; - gboolean allow_any; int i; if (backend->cogl_context != NULL) return TRUE; - if (allowed_drivers == NULL) - allowed_drivers = CLUTTER_DRIVERS; - - allow_any = strstr (allowed_drivers, "*") != NULL; - drivers_list = g_getenv ("CLUTTER_DRIVER"); if (drivers_list == NULL) - drivers_list = allowed_drivers; + drivers_list = CLUTTER_DRIVERS; known_drivers = g_strsplit (drivers_list, ",", 0); @@ -321,11 +313,7 @@ clutter_backend_real_create_context (ClutterBackend *backend, for (j = 0; j < G_N_ELEMENTS (all_known_drivers); j++) { - if (!allow_any && !is_any && !strstr (driver_name, all_known_drivers[j].driver_name)) - continue; - - if ((allow_any && is_any) || - (is_any && strstr (allowed_drivers, all_known_drivers[j].driver_name)) || + if (is_any || g_str_equal (all_known_drivers[j].driver_name, driver_name)) { CLUTTER_NOTE (BACKEND, "Checking for the %s driver", all_known_drivers[j].driver_desc); @@ -649,18 +637,6 @@ clutter_backend_get_cogl_context (ClutterBackend *backend) return backend->cogl_context; } -void -clutter_set_allowed_drivers (const char *drivers) -{ - if (_clutter_context_is_initialized ()) - { - g_warning ("Clutter has already been initialized.\n"); - return; - } - - allowed_drivers = g_strdup (drivers); -} - /** * clutter_backend_get_input_method: * @backend: the #CLutterBackend