Commit 085e6634 authored by Debarshi Ray's avatar Debarshi Ray

gegl: Allow overriding the number of threads

A subsequent commit will use gegl:path to create images that will be
used as input data for testing. It turns out that, for hitherto
unknown reasons, using multiple threads causes minor disturbances in
gegl:path's output which interferes with the tests. Therefore, it is
useful to override the number of threads used by GEGL for affected
tests where the multi-threading isn't part of the code that is being
tested.

Since gegl_init reads the GEGL_THREADS environment variable, it has to
be called later so that it can override the default GEGL
configuration.

GNOME/gnome-photos!84
parent cf0e0fde
......@@ -601,8 +601,6 @@ photos_gegl_init (void)
gint threads;
guint n_processors;
gegl_init (NULL, NULL);
n_processors = g_get_num_processors ();
g_return_if_fail (n_processors > 0);
......@@ -618,6 +616,8 @@ photos_gegl_init (void)
g_object_set (config, "application-license", "GPL3", NULL);
g_object_set (config, "threads", threads, NULL);
g_object_set (config, "use-opencl", FALSE, NULL);
gegl_init (NULL, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment