diff options
author | Alexander Larsson <alexl@redhat.com> | 2017-01-11 10:08:58 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2017-01-11 10:22:40 +0100 |
commit | 65ad2541d736a699d01642096631984be7d64681 (patch) | |
tree | 492d999fd786accf1330ecb74adb37ae8bf3e1ab /gtk/gtkrenderbackground.c | |
parent | 2f453cc57e37638178f0cf2241609e829963af51 (diff) | |
download | gtk+-65ad2541d736a699d01642096631984be7d64681.tar.gz |
Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
Diffstat (limited to 'gtk/gtkrenderbackground.c')
-rw-r--r-- | gtk/gtkrenderbackground.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkrenderbackground.c b/gtk/gtkrenderbackground.c index 67e8d4fc1b..e52d1de3b7 100644 --- a/gtk/gtkrenderbackground.c +++ b/gtk/gtkrenderbackground.c @@ -681,7 +681,8 @@ gtk_css_style_snapshot_background (GtkCssStyle *style, bottom = gsk_container_node_new (NULL, 0); blend = gsk_blend_node_new (bottom, top, blend_mode); - gsk_render_node_set_name (blend, "BackgroundBlend"); + if (snapshot->record_names) + gsk_render_node_set_name (blend, "BackgroundBlend"); gtk_snapshot_push (snapshot, TRUE, "BackgroundBlendGroup"); gtk_snapshot_append_node (snapshot, blend); |