summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-11-15 14:59:50 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-11-15 14:59:50 +0000
commitf63891f030f6cb7d72a911e15e8176cd6b27f50e (patch)
tree8ea595fec0e63d758ef6329a46b7cd91b440570c
parent58b6ad787b115f89eb8f1d982e00cb4e9e55b7a6 (diff)
downloadclutter-f63891f030f6cb7d72a911e15e8176cd6b27f50e.tar.gz
texture: Do not use clutter_get_timestamp()
The clutter_get_timestamp() output depends on whether Clutter was compiled with debugging support — it's meant to be used only by the debugging notes, and it should not be used for anything else.
-rw-r--r--clutter/clutter-texture.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c
index 95a7a150a..cc1fc3cf8 100644
--- a/clutter/clutter-texture.c
+++ b/clutter/clutter-texture.c
@@ -1759,13 +1759,11 @@ clutter_texture_async_load_complete (ClutterTexture *self,
static gboolean
texture_repaint_upload_func (gpointer user_data)
{
- gulong start_time;
-
g_mutex_lock (&upload_list_mutex);
if (upload_list != NULL)
{
- start_time = clutter_get_timestamp ();
+ gint64 start_time = g_get_monotonic_time ();
/* continue uploading textures as long as we havent spent more
* then 5ms doing so this stage redraw cycle.
@@ -1794,7 +1792,8 @@ texture_repaint_upload_func (gpointer user_data)
upload_list = g_list_remove (upload_list, async_data);
clutter_texture_async_data_free (async_data);
}
- while (upload_list && clutter_get_timestamp () < start_time + 5 * 1000);
+ while (upload_list != NULL &&
+ g_get_monotonic_time () < start_time + 5 * 1000000L);
}
if (upload_list != NULL)