snapshot: Get rid of record_nodes flag
authorBenjamin Otte <otte@redhat.com>
Tue, 24 Apr 2018 02:02:55 +0000 (04:02 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 24 Apr 2018 02:06:58 +0000 (04:06 +0200)
Instead, use GTK_DEBUG=snapshot for it.

gtk/gtksnapshot.c
gtk/gtksnapshotprivate.h

index 3b175505dd2747fcd72b9252f47747bfb2dbae3a..e8b49d92d3a9bc299fc8aebaeaddcf369700d1ea 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "gtkcssrgbavalueprivate.h"
 #include "gtkcssshadowsvalueprivate.h"
+#include "gtkdebug.h"
 #include "gtkrenderbackgroundprivate.h"
 #include "gtkrenderborderprivate.h"
 #include "gtkrendericonprivate.h"
@@ -159,7 +160,6 @@ gtk_snapshot_new (void)
 
   snapshot = g_object_new (GTK_TYPE_SNAPSHOT, NULL);
 
-  snapshot->record_names = FALSE;
   snapshot->state_stack = g_array_new (FALSE, TRUE, sizeof (GtkSnapshotState));
   g_array_set_clear_func (snapshot->state_stack, (GDestroyNotify)gtk_snapshot_state_clear);
   snapshot->nodes = g_ptr_array_new_with_free_func ((GDestroyNotify)gsk_render_node_unref);
@@ -249,7 +249,7 @@ gtk_snapshot_push_debug (GtkSnapshot *snapshot,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_debug);
 
-  if (snapshot->record_names)
+  if (GTK_DEBUG_CHECK (SNAPSHOT))
     {
       va_list args;
 
index d560bbbbc0c32bd857e82404822b36eb9632cccf..b54fb4b7028e37008021716a9561845b89271875 100644 (file)
@@ -88,7 +88,6 @@ struct _GtkSnapshotState {
 struct _GdkSnapshot {
   GObject                parent_instance; /* it's really GdkSnapshot, but don't tell anyone! */
 
-  gboolean               record_names;
   GArray                *state_stack;
   GPtrArray             *nodes;
 };