summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-30 21:01:56 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-08-30 21:03:42 (GMT)
commitd34bd9be49b2fc8d85eba54f1e8e67bc40a0eb67 (patch)
treec2c2e4a50aba71841f8af8775aaedf9583239541 /gfx
parentfed91b8b2e8d4de93d001025fa83f6b8d7c51e49 (diff)
downloadeeshow-d34bd9be49b2fc8d85eba54f1e8e67bc40a0eb67.zip
eeshow-d34bd9be49b2fc8d85eba54f1e8e67bc40a0eb67.tar.gz
eeshow-d34bd9be49b2fc8d85eba54f1e8e67bc40a0eb67.tar.bz2
gfx/diff.c: begin arduous task of teaching diff mode some manners
Down from about 2.2 MB to ~24 kB, for eeshow ../../n9/ee/hw/neo900.pro -- diff ../../n9/ee/hw/neo900.pro > /dev/null
Diffstat (limited to 'gfx')
-rw-r--r--gfx/diff.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gfx/diff.c b/gfx/diff.c
index 68c3ef9..9eb53e6 100644
--- a/gfx/diff.c
+++ b/gfx/diff.c
@@ -218,6 +218,9 @@ static bool diff_args(void *ctx, int argc, char *const *argv)
sch_render(new_sch.sheets, diff->gfx);
diff->new_gfx = diff->gfx;
+ sch_free(&new_sch);
+ lib_free(&new_lib);
+
diff->gfx = gfx_init(&cro_img_ops);
if (!gfx_args(diff->gfx, argc, argv))
goto fail_open;
@@ -457,6 +460,8 @@ static int diff_end(void *ctx)
cairo_surface_destroy(s);
cairo_destroy(old_cr);
+ gfx_end(diff->new_gfx);
+
return changed;
}