summaryrefslogtreecommitdiff
path: root/gtk/gtkpixelcache.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-04-09 23:28:50 +0200
committerBenjamin Otte <otte@redhat.com>2014-04-10 00:16:53 +0200
commit2a9d2a966a73c649c2749e759e44d6c0ea7af03b (patch)
tree84fce18f9e904dee24c95f03b7307dd2b79683cf /gtk/gtkpixelcache.c
parent3036a536673bdbd339124008b51a8cdd641f5143 (diff)
downloadgtk+-2a9d2a966a73c649c2749e759e44d6c0ea7af03b.tar.gz
pixelcache: Split out a function
https://bugzilla.gnome.org/show_bug.cgi?id=726475
Diffstat (limited to 'gtk/gtkpixelcache.c')
-rw-r--r--gtk/gtkpixelcache.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gtk/gtkpixelcache.c b/gtk/gtkpixelcache.c
index 4cc07171d7..2a909641f7 100644
--- a/gtk/gtkpixelcache.c
+++ b/gtk/gtkpixelcache.c
@@ -377,12 +377,14 @@ _gtk_pixel_cache_repaint (GtkPixelCache *cache,
cairo_region_destroy (region_dirty);
}
-static gboolean
-blow_cache_cb (gpointer user_data)
+static void
+gtk_pixel_cache_blow_cache (GtkPixelCache *cache)
{
- GtkPixelCache *cache = user_data;
-
- cache->timeout_tag = 0;
+ if (cache->timeout_tag)
+ {
+ g_source_remove (cache->timeout_tag);
+ cache->timeout_tag = 0;
+ }
if (cache->surface)
{
@@ -392,6 +394,16 @@ blow_cache_cb (gpointer user_data)
cairo_region_destroy (cache->surface_dirty);
cache->surface_dirty = NULL;
}
+}
+
+static gboolean
+blow_cache_cb (gpointer user_data)
+{
+ GtkPixelCache *cache = user_data;
+
+ cache->timeout_tag = 0;
+
+ gtk_pixel_cache_blow_cache (cache);
return G_SOURCE_REMOVE;
}