From 321afdd0e417c701fbf9797ccfc3fd59a86d4dc2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 16 Aug 2015 18:15:46 +0200 Subject: Top frame is created by rendering pipeline, but owned by caller --- tests/render_test.c | 4 +++- tests/render_test_sc1.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/render_test.c b/tests/render_test.c index 0c47b2e..51d4a3a 100644 --- a/tests/render_test.c +++ b/tests/render_test.c @@ -51,16 +51,18 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data) gint w, h; cairo_surface_t *surface; SCBlock *scblocks = data; + struct frame *top; w = gtk_widget_get_allocated_width(da); h = gtk_widget_get_allocated_height(da); surface = render_sc(scblocks, w, h, w, h, NULL, NULL, NULL, - ISZ_EDITOR, 1); + ISZ_EDITOR, 1, &top); cairo_rectangle(cr, 0.0, 0.0, w, h); cairo_set_source_surface(cr, surface, 0.0, 0.0); cairo_fill(cr); cairo_surface_destroy(surface); + frame_free(top); return FALSE; } diff --git a/tests/render_test_sc1.c b/tests/render_test_sc1.c index 46a9c44..8a6ff8b 100644 --- a/tests/render_test_sc1.c +++ b/tests/render_test_sc1.c @@ -50,16 +50,18 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data) gint w, h; cairo_surface_t *surface; SCBlock *scblocks = data; + struct frame *top; w = gtk_widget_get_allocated_width(da); h = gtk_widget_get_allocated_height(da); surface = render_sc(scblocks, w, h, w, h, NULL, NULL, NULL, - ISZ_EDITOR, 1); + ISZ_EDITOR, 1, &top); cairo_rectangle(cr, 0.0, 0.0, w, h); cairo_set_source_surface(cr, surface, 0.0, 0.0); cairo_fill(cr); cairo_surface_destroy(surface); + frame_free(top); return FALSE; } -- cgit v1.2.3