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/gtkcssimage.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/gtkcssimage.c')
-rw-r--r-- | gtk/gtkcssimage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c index 665ef93c47..6d0f449803 100644 --- a/gtk/gtkcssimage.c +++ b/gtk/gtkcssimage.c @@ -219,7 +219,7 @@ _gtk_css_image_draw (GtkCssImage *image, double width, double height) { - GtkSnapshot snapshot; + GtkSnapshot *snapshot; GskRenderNode *node; cairo_region_t *clip; @@ -231,9 +231,9 @@ _gtk_css_image_draw (GtkCssImage *image, cairo_save (cr); clip = cairo_region_create_rectangle (&(cairo_rectangle_int_t) { 0, 0, width, height }); - gtk_snapshot_init (&snapshot, NULL, FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (image)); - gtk_css_image_snapshot (image, &snapshot, width, height); - node = gtk_snapshot_finish (&snapshot); + snapshot = gtk_snapshot_new (NULL, FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (image)); + gtk_css_image_snapshot (image, snapshot, width, height); + node = gtk_snapshot_free_to_node (snapshot); if (node != NULL) { |