snapshot: Get rid of record_nodes flag

Instead, use GTK_DEBUG=snapshot for it.
This commit is contained in:
Benjamin Otte 2018-04-24 04:02:55 +02:00
parent b49dccb86d
commit 1e0eed79b5
2 changed files with 2 additions and 3 deletions

View 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;

View 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;
};