[gtk+/gtk-3-12] pixelcache: Split out a function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-12] pixelcache: Split out a function
- Date: Wed, 9 Apr 2014 23:57:57 +0000 (UTC)
commit 651f1c566a3646b569d176e9317d6b367af8562e
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 9 23:28:50 2014 +0200
pixelcache: Split out a function
https://bugzilla.gnome.org/show_bug.cgi?id=726475
gtk/gtkpixelcache.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkpixelcache.c b/gtk/gtkpixelcache.c
index 4cc0717..2a90964 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]