Commit caa28356 authored by Jiří Techet's avatar Jiří Techet

Use CLUTTER_PRIORITY_REDRAW for all idle functions

Clutter uses CLUTTER_PRIORITY_REDRAW for all its animations so we have to
use at least this priority in order to avoid starvation in certain
situations. There doesn't seem to be any need for other priorities
at the moment.
parent ed49d7a8
......@@ -922,7 +922,7 @@ void
champlain_file_cache_purge_on_idle (ChamplainFileCache *file_cache)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (file_cache));
g_idle_add_full (G_PRIORITY_DEFAULT,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) purge_on_idle,
g_object_ref (file_cache),
(GDestroyNotify) g_object_unref);
......
......@@ -915,7 +915,7 @@ champlain_label_queue_redraw (ChamplainLabel *label)
if (!priv->redraw_id)
{
priv->redraw_id =
g_idle_add_full (G_PRIORITY_DEFAULT,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) redraw_on_idle,
g_object_ref (label),
(GDestroyNotify) g_object_unref);
......
......@@ -818,7 +818,7 @@ static void
on_animation_completed (G_GNUC_UNUSED ClutterAnimation *animation,
ChamplainMarker *marker)
{
g_idle_add_full (G_PRIORITY_DEFAULT,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) on_idle,
g_object_ref (marker),
(GDestroyNotify) g_object_unref);
......
......@@ -396,7 +396,7 @@ memphis_worker_thread (gpointer worker_data,
cairo_destroy (cr);
}
clutter_threads_add_idle_full (G_PRIORITY_DEFAULT, tile_loaded_cb, data, NULL);
clutter_threads_add_idle_full (CLUTTER_PRIORITY_REDRAW, tile_loaded_cb, data, NULL);
}
......
......@@ -744,7 +744,7 @@ schedule_redraw (ChamplainPathLayer *layer)
if (!layer->priv->redraw_scheduled)
{
layer->priv->redraw_scheduled = TRUE;
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) redraw_path,
g_object_ref (layer),
(GDestroyNotify) g_object_unref);
......
......@@ -461,7 +461,7 @@ schedule_redraw (ChamplainScale *scale)
if (!scale->priv->redraw_scheduled)
{
scale->priv->redraw_scheduled = TRUE;
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) redraw_scale,
g_object_ref (scale),
(GDestroyNotify) g_object_unref);
......
......@@ -615,7 +615,7 @@ champlain_view_allocate (ClutterActor *actor,
if (priv->viewport_width != width || priv->viewport_height != height)
{
g_idle_add_full (G_PRIORITY_HIGH_IDLE,
g_idle_add_full (CLUTTER_PRIORITY_REDRAW,
(GSourceFunc) _update_idle_cb,
g_object_ref (view),
(GDestroyNotify) g_object_unref);
......@@ -1980,8 +1980,7 @@ view_load_visible_tiles (ChamplainView *view)
g_object_ref (tile);
g_object_ref (priv->map_source);
/* set priority high, otherwise tiles will be loaded after panning is done */
g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) fill_tile_cb, data, NULL);
g_idle_add_full (CLUTTER_PRIORITY_REDRAW, (GSourceFunc) fill_tile_cb, data, NULL);
}
x += dirs[turn % 4 + 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment