diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-03-10 21:14:09 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-03-11 00:31:44 -0500 |
commit | 694f1d8ecdf39317cabe68f595950f67b35f4af6 (patch) | |
tree | 3329107a31e14682555db878f7cd4f245736de6a /gtk/gtkiconview.c | |
parent | e23f641e491fd85371a613dde7f90fee8924657d (diff) | |
download | gtk+-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.c | 16 |
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; |