aboutsummaryrefslogtreecommitdiff
path: root/fiv-io-benchmark.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-01-24 04:03:19 +0100
committerPřemysl Eric Janouch <p@janouch.name>2022-01-24 05:48:13 +0100
commit788485d81eefcd43f0a66cf4cc664f8bde4423f5 (patch)
tree8c005e62f5ba11c8834e62334d40301515b137b4 /fiv-io-benchmark.c
parent991e74b99bbf344effe456f71c544a284f7afe14 (diff)
downloadfiv-788485d81eefcd43f0a66cf4cc664f8bde4423f5.tar.gz
fiv-788485d81eefcd43f0a66cf4cc664f8bde4423f5.tar.xz
fiv-788485d81eefcd43f0a66cf4cc664f8bde4423f5.zip
Redirect warnings to the info bar
And speed up thumbnailing of animated images while at it. Also, fix thumbnailing SVGs with external links.
Diffstat (limited to 'fiv-io-benchmark.c')
-rw-r--r--fiv-io-benchmark.c17
1 files changed, 12 insertions, 5 deletions
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 <p@janouch.name>
+// Copyright (c) 2021 - 2022, Přemysl Eric Janouch <p@janouch.name>
//
// 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;