summaryrefslogtreecommitdiff
path: root/gtk/gtkiconview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-03-10 21:14:09 -0500
committerMatthias Clasen <mclasen@redhat.com>2018-03-11 00:31:44 -0500
commit694f1d8ecdf39317cabe68f595950f67b35f4af6 (patch)
tree3329107a31e14682555db878f7cd4f245736de6a /gtk/gtkiconview.c
parente23f641e491fd85371a613dde7f90fee8924657d (diff)
downloadgtk+-694f1d8ecdf39317cabe68f595950f67b35f4af6.tar.gz
Stop using stack-allocated snapshots
Use the new/free api instead of init/finish for GtkSnapshot.
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r--gtk/gtkiconview.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 6ffbd1d523..e03640344a 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6689,7 +6689,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
GtkTreePath *path)
{
GtkWidget *widget;
- GtkSnapshot snapshot;
+ GtkSnapshot *snapshot;
GskRenderNode *node;
cairo_t *cr;
cairo_surface_t *surface;
@@ -6724,15 +6724,15 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
rect.width,
rect.height);
- gtk_snapshot_init (&snapshot, NULL, FALSE, NULL, "IconView DragIcon");
- gtk_icon_view_snapshot_item (icon_view, &snapshot, item,
- icon_view->priv->item_padding,
- icon_view->priv->item_padding,
- FALSE);
- node = gtk_snapshot_finish (&snapshot);
+ snapshot = gtk_snapshot_new (NULL, FALSE, NULL, "IconView DragIcon");
+ gtk_icon_view_snapshot_item (icon_view, snapshot, item,
+ icon_view->priv->item_padding,
+ icon_view->priv->item_padding,
+ FALSE);
+ node = gtk_snapshot_free_to_node (snapshot);
cr = cairo_create (surface);
- gsk_render_node_draw (node, cr);
+ gsk_render_node_draw (node, cr);
cairo_destroy (cr);
return surface;