[gtk+] GtkStyleContext: Remove property cache
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkStyleContext: Remove property cache
- Date: Thu, 20 Jul 2017 02:01:02 +0000 (UTC)
commit fc47be9339fa8b1b009d7e850d4149000e497a62
Author: Timm Bäder <mail baedert org>
Date: Wed Jul 19 13:07:48 2017 +0200
GtkStyleContext: Remove property cache
It was only used for widget style properties which don't exist anymore.
gtk/gtkcsswidgetnode.c | 19 -------------------
gtk/gtkstylecontext.c | 23 -----------------------
gtk/gtkstylecontextprivate.h | 1 -
3 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index e501160..b7d3297 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -65,24 +65,6 @@ gtk_css_widget_node_queue_callback (GtkWidget *widget,
return G_SOURCE_CONTINUE;
}
-static GtkCssStyle *
-gtk_css_widget_node_update_style (GtkCssNode *cssnode,
- GtkCssChange change,
- gint64 timestamp,
- GtkCssStyle *style)
-{
- GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (cssnode);
-
- if (widget_node->widget != NULL)
- {
- GtkStyleContext *context = _gtk_widget_peek_style_context (widget_node->widget);
- if (context)
- gtk_style_context_clear_property_cache (context);
- }
-
- return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->update_style (cssnode, change, timestamp,
style);
-}
-
static void
gtk_css_widget_node_queue_validate (GtkCssNode *node)
{
@@ -220,7 +202,6 @@ gtk_css_widget_node_class_init (GtkCssWidgetNodeClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gtk_css_widget_node_finalize;
- node_class->update_style = gtk_css_widget_node_update_style;
node_class->validate = gtk_css_widget_node_validate;
node_class->queue_validate = gtk_css_widget_node_queue_validate;
node_class->dequeue_validate = gtk_css_widget_node_dequeue_validate;
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index c22c67b..ee7d7d5 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -125,7 +125,6 @@ struct _GtkStyleContextPrivate
GtkStyleContext *parent;
GtkCssNode *cssnode;
GSList *saved_nodes;
- GArray *property_cache;
GdkFrameClock *frame_clock;
@@ -238,23 +237,6 @@ gtk_style_context_class_init (GtkStyleContextClass *klass)
g_object_class_install_properties (object_class, LAST_PROP, properties);
}
-void
-gtk_style_context_clear_property_cache (GtkStyleContext *context)
-{
- GtkStyleContextPrivate *priv = context->priv;
- guint i;
-
- for (i = 0; i < priv->property_cache->len; i++)
- {
- PropertyValue *node = &g_array_index (priv->property_cache, PropertyValue, i);
-
- g_param_spec_unref (node->pspec);
- g_value_unset (&node->value);
- }
-
- g_array_set_size (priv->property_cache, 0);
-}
-
static void
gtk_style_context_pop_style_node (GtkStyleContext *context)
{
@@ -321,8 +303,6 @@ gtk_style_context_init (GtkStyleContext *context)
if (priv->screen == NULL)
g_error ("Can't create a GtkStyleContext without a display connection");
- priv->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
-
gtk_style_context_set_cascade (context,
_gtk_settings_get_style_cascade (gtk_settings_get_for_screen
(priv->screen), 1));
@@ -357,9 +337,6 @@ gtk_style_context_finalize (GObject *object)
g_object_unref (priv->cssnode);
- gtk_style_context_clear_property_cache (context);
- g_array_free (priv->property_cache, TRUE);
-
G_OBJECT_CLASS (gtk_style_context_parent_class)->finalize (object);
}
diff --git a/gtk/gtkstylecontextprivate.h b/gtk/gtkstylecontextprivate.h
index 45ecda4..1bb4334 100644
--- a/gtk/gtkstylecontextprivate.h
+++ b/gtk/gtkstylecontextprivate.h
@@ -53,7 +53,6 @@ const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *c
GParamSpec *pspec);
void gtk_style_context_validate (GtkStyleContext *context,
GtkCssStyleChange *change);
-void gtk_style_context_clear_property_cache (GtkStyleContext *context);
gboolean _gtk_style_context_check_region_name (const gchar *str);
gboolean _gtk_style_context_resolve_color (GtkStyleContext *context,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]