mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
Remove unused clutter_set_allowed_drivers
Unused since d1c62d882a
("clutter: Do not read settings from ini file").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3178>
This commit is contained in:
parent
d2058255b3
commit
4263db65e3
@ -102,8 +102,6 @@ gfloat _clutter_backend_get_units_per_em (Clutter
|
|||||||
PangoFontDescription *font_desc);
|
PangoFontDescription *font_desc);
|
||||||
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
|
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
|
||||||
|
|
||||||
void clutter_set_allowed_drivers (const char *drivers);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend);
|
ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend);
|
||||||
|
|
||||||
|
@ -287,8 +287,6 @@ static const struct {
|
|||||||
{ "any", "Default Cogl driver", COGL_DRIVER_ANY },
|
{ "any", "Default Cogl driver", COGL_DRIVER_ANY },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *allowed_drivers;
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_backend_real_create_context (ClutterBackend *backend,
|
clutter_backend_real_create_context (ClutterBackend *backend,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -296,20 +294,14 @@ clutter_backend_real_create_context (ClutterBackend *backend,
|
|||||||
GError *internal_error = NULL;
|
GError *internal_error = NULL;
|
||||||
const char *drivers_list;
|
const char *drivers_list;
|
||||||
char **known_drivers;
|
char **known_drivers;
|
||||||
gboolean allow_any;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (backend->cogl_context != NULL)
|
if (backend->cogl_context != NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (allowed_drivers == NULL)
|
|
||||||
allowed_drivers = CLUTTER_DRIVERS;
|
|
||||||
|
|
||||||
allow_any = strstr (allowed_drivers, "*") != NULL;
|
|
||||||
|
|
||||||
drivers_list = g_getenv ("CLUTTER_DRIVER");
|
drivers_list = g_getenv ("CLUTTER_DRIVER");
|
||||||
if (drivers_list == NULL)
|
if (drivers_list == NULL)
|
||||||
drivers_list = allowed_drivers;
|
drivers_list = CLUTTER_DRIVERS;
|
||||||
|
|
||||||
known_drivers = g_strsplit (drivers_list, ",", 0);
|
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++)
|
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))
|
if (is_any ||
|
||||||
continue;
|
|
||||||
|
|
||||||
if ((allow_any && is_any) ||
|
|
||||||
(is_any && strstr (allowed_drivers, all_known_drivers[j].driver_name)) ||
|
|
||||||
g_str_equal (all_known_drivers[j].driver_name, driver_name))
|
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);
|
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;
|
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:
|
* clutter_backend_get_input_method:
|
||||||
* @backend: the #CLutterBackend
|
* @backend: the #CLutterBackend
|
||||||
|
Loading…
Reference in New Issue
Block a user