cssnode: Make widget node not copy the path
authorBenjamin Otte <otte@redhat.com>
Mon, 9 Feb 2015 15:14:03 +0000 (16:14 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 Mar 2015 14:23:30 +0000 (15:23 +0100)
Instead, use gtk_widget_get_path() which makes GtkWidget cache the path.
This is a temporary solution until we can get rid of widget paths.

This increases memory usage quite noticably.

gtk/gtkcsswidgetnode.c

index 46785b4b509b38c91c15cfb443f7efc1f6776808..b2790815ede74f3a9fddd552ea251d1066abefb5 100644 (file)
@@ -178,10 +178,8 @@ gtk_css_widget_node_init_matcher (GtkCssNode     *node,
   if (widget_node->widget == NULL)
     return FALSE;
 
-  *path_out = _gtk_widget_create_path (widget_node->widget);
-
   return _gtk_css_matcher_init (matcher,
-                                *path_out,
+                                gtk_widget_get_path (widget_node->widget),
                                 gtk_css_node_get_declaration (node));
 }