gtk: Remove unneeded gtk_snapshot_push()/pop() calls

This commit is contained in:
Benjamin Otte 2016-12-09 21:38:35 +01:00
parent f8932d643d
commit cb8483b0a6
5 changed files with 1 additions and 37 deletions

View File

@ -464,16 +464,8 @@ gtk_accel_label_snapshot (GtkWidget *widget,
{
GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (widget);
guint ac_width;
GtkAllocation allocation, clip;
GtkAllocation allocation;
GtkRequisition requisition;
graphene_rect_t bounds;
gtk_widget_get_clip (widget, &clip);
gtk_widget_get_allocation (widget, &allocation);
graphene_rect_init (&bounds,
clip.x - allocation.x, clip.y - allocation.y,
clip.width, clip.height);
gtk_snapshot_push (snapshot, &bounds, "AccelLabel");
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->snapshot (widget, snapshot);
@ -508,8 +500,6 @@ gtk_accel_label_snapshot (GtkWidget *widget,
g_object_unref (accel_layout);
}
gtk_snapshot_pop (snapshot);
}
static void

View File

@ -3095,21 +3095,10 @@ gtk_container_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkContainer *container = GTK_CONTAINER (widget);
GtkAllocation allocation, clip;
graphene_rect_t bounds;
gtk_widget_get_clip (widget, &clip);
gtk_widget_get_allocation (widget, &allocation);
graphene_rect_init (&bounds,
clip.x - allocation.x, clip.y - allocation.y,
clip.width, clip.height);
gtk_snapshot_push (snapshot, &bounds, "Children<%s>", G_OBJECT_TYPE_NAME (container));
gtk_container_forall (container,
gtk_container_snapshot_forall,
snapshot);
gtk_snapshot_pop (snapshot);
}
static void

View File

@ -1033,8 +1033,6 @@ gtk_css_gadget_snapshot (GtkCssGadget *gadget,
get_box_border (style, &border);
get_box_padding (style, &padding);
gtk_snapshot_push (snapshot, &bounds, "%s<%s>", gtk_css_node_get_name (priv->node), G_OBJECT_TYPE_NAME (priv->owner));
gtk_snapshot_translate_2d (snapshot, x + margin.left, y + margin.top);
gtk_css_style_snapshot_background (style,
snapshot,
@ -1068,8 +1066,6 @@ gtk_css_gadget_snapshot (GtkCssGadget *gadget,
height - margin.top - margin.bottom);
gtk_snapshot_translate_2d (snapshot, - x - margin.left, - y - margin.top);
}
gtk_snapshot_pop (snapshot);
}
void

View File

@ -15582,8 +15582,6 @@ gtk_widget_snapshot (GtkWidget *widget,
gboolean result;
cairo_t *cr;
gtk_snapshot_push (snapshot, &bounds, "DrawSignal<%s>", G_OBJECT_TYPE_NAME (widget));
klass->snapshot (widget, snapshot);
cr = gtk_snapshot_append_cairo_node (snapshot,
@ -15591,8 +15589,6 @@ gtk_widget_snapshot (GtkWidget *widget,
"DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
g_signal_emit (widget, widget_signals[DRAW], 0, cr, &result);
cairo_destroy (cr);
gtk_snapshot_pop (snapshot);
}
else
{

View File

@ -9392,7 +9392,6 @@ gtk_window_snapshot (GtkWidget *widget,
GtkAllocation allocation;
GtkBorder window_border;
gint title_height;
graphene_rect_t bounds;
GList *l;
context = gtk_widget_get_style_context (widget);
@ -9400,10 +9399,6 @@ gtk_window_snapshot (GtkWidget *widget,
get_shadow_width (GTK_WINDOW (widget), &window_border);
_gtk_widget_get_allocation (widget, &allocation);
graphene_rect_init (&bounds, allocation.x, allocation.y, allocation.width, allocation.height);
gtk_snapshot_push (snapshot, &bounds, "Window Decoration");
if (priv->client_decorated &&
priv->decorated &&
!priv->fullscreen &&
@ -9480,8 +9475,6 @@ gtk_window_snapshot (GtkWidget *widget,
}
gtk_debug_updates_snapshot (widget, snapshot);
gtk_snapshot_pop (snapshot);
}
/**