texture: Remove GStaticMutex

It's now possible to statically initialize a GMutex.
This commit is contained in:
Emmanuele Bassi 2011-09-27 14:22:22 +01:00
parent 1465aa04aa
commit 11c585c420

View File

@ -166,7 +166,7 @@ static int texture_signals[LAST_SIGNAL] = { 0 };
static GThreadPool *async_thread_pool = NULL; static GThreadPool *async_thread_pool = NULL;
static guint repaint_upload_func = 0; static guint repaint_upload_func = 0;
static GList *upload_list = NULL; static GList *upload_list = NULL;
static GStaticMutex upload_list_mutex = G_STATIC_MUTEX_INIT; static GMutex upload_list_mutex = G_MUTEX_INIT;
static CoglMaterial *texture_template_material = NULL; static CoglMaterial *texture_template_material = NULL;
@ -1795,7 +1795,7 @@ texture_repaint_upload_func (gpointer user_data)
{ {
gulong start_time; gulong start_time;
g_static_mutex_lock (&upload_list_mutex); g_mutex_lock (&upload_list_mutex);
if (upload_list) if (upload_list)
{ {
@ -1823,7 +1823,7 @@ texture_repaint_upload_func (gpointer user_data)
_clutter_master_clock_ensure_next_iteration (master_clock); _clutter_master_clock_ensure_next_iteration (master_clock);
} }
g_static_mutex_unlock (&upload_list_mutex); g_mutex_unlock (&upload_list_mutex);
return TRUE; return TRUE;
} }
@ -1870,7 +1870,7 @@ clutter_texture_thread_func (gpointer user_data, gpointer pool_data)
* set it while we're holding the mutex so we can safely start the * set it while we're holding the mutex so we can safely start the
* idle handler now without the possibility of calling the * idle handler now without the possibility of calling the
* callback after it is aborted */ * callback after it is aborted */
g_static_mutex_lock (&upload_list_mutex); g_mutex_lock (&upload_list_mutex);
if (repaint_upload_func == 0) if (repaint_upload_func == 0)
{ {
@ -1882,7 +1882,7 @@ clutter_texture_thread_func (gpointer user_data, gpointer pool_data)
upload_list = g_list_append (upload_list, data); upload_list = g_list_append (upload_list, data);
data->upload_queued = TRUE; data->upload_queued = TRUE;
g_static_mutex_unlock (&upload_list_mutex); g_mutex_unlock (&upload_list_mutex);
g_mutex_unlock (data->mutex); g_mutex_unlock (data->mutex);