mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
core: Don't use g_once_*() API
As Cogl is not thread safe, we don't really need a thread safe cogl_init() function. This also reduces the amount of dependency cogl has on glib, handy when we want to create a standalone version of cogl, some day. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 429e49e3028a425eb198d8969dfbf57790e2e72a)
This commit is contained in:
parent
5ef579b593
commit
24fa64bea2
@ -793,9 +793,9 @@ _cogl_error_quark (void)
|
|||||||
void
|
void
|
||||||
_cogl_init (void)
|
_cogl_init (void)
|
||||||
{
|
{
|
||||||
static size_t init_status = 0;
|
static CoglBool initialized = FALSE;
|
||||||
|
|
||||||
if (g_once_init_enter (&init_status))
|
if (initialized == FALSE)
|
||||||
{
|
{
|
||||||
bindtextdomain (GETTEXT_PACKAGE, COGL_LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, COGL_LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
@ -804,7 +804,7 @@ _cogl_init (void)
|
|||||||
|
|
||||||
_cogl_config_read ();
|
_cogl_config_read ();
|
||||||
_cogl_debug_check_environment ();
|
_cogl_debug_check_environment ();
|
||||||
g_once_init_leave (&init_status, 1);
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user