From: Benjamin Otte Date: Tue, 24 Apr 2018 02:02:55 +0000 (+0200) Subject: snapshot: Get rid of record_nodes flag X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~411 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1e0eed79b5b0d51f10ad4db7a13637c319124d25;p=gtk4.git snapshot: Get rid of record_nodes flag Instead, use GTK_DEBUG=snapshot for it. --- diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 3b175505dd..e8b49d92d3 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -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; diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h index d560bbbbc0..b54fb4b702 100644 --- a/gtk/gtksnapshotprivate.h +++ b/gtk/gtksnapshotprivate.h @@ -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; };