From 788485d81eefcd43f0a66cf4cc664f8bde4423f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 24 Jan 2022 04:03:19 +0100 Subject: Redirect warnings to the info bar And speed up thumbnailing of animated images while at it. Also, fix thumbnailing SVGs with external links. --- fiv-io-benchmark.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'fiv-io-benchmark.c') diff --git a/fiv-io-benchmark.c b/fiv-io-benchmark.c index 48c5b79..00406cd 100644 --- a/fiv-io-benchmark.c +++ b/fiv-io-benchmark.c @@ -1,7 +1,7 @@ // -// fiv-io-benchmark.c: see if we're worth the name +// fiv-io-benchmark.c: see if we suck // -// Copyright (c) 2021, Přemysl Eric Janouch +// Copyright (c) 2021 - 2022, Přemysl Eric Janouch // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted. @@ -33,9 +33,16 @@ static void one_file(const char *filename) { double since_us = timestamp(); - gchar *uri = g_filename_to_uri(filename, NULL, NULL); - cairo_surface_t *loaded_by_us = fiv_io_open(uri, NULL, FALSE, NULL); - g_free(uri); + FivIoOpenContext ctx = { + .uri = g_filename_to_uri(filename, NULL, NULL), + .screen_dpi = 96, + // Only using this array as a redirect. + .warnings = g_ptr_array_new_with_free_func(g_free), + }; + + cairo_surface_t *loaded_by_us = fiv_io_open(&ctx, NULL); + g_free((char *) ctx.uri); + g_ptr_array_free(ctx.warnings, TRUE); if (!loaded_by_us) return; -- cgit v1.2.3