mirror of https://github.com/GNOME/gimp.git
app: set the number of threads on GeglConfig again, it needs testing
- enable the setting code in gimp-gegl.c again - but set the default to one thread in GimpGeglConfig, with a CPP warning - rename "processors" to "threads" in the GUI - add a warning box about unexpected results when increasing #threads
This commit is contained in:
parent
23f31b2ca3
commit
1f5739de57
|
@ -139,9 +139,14 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *klass)
|
|||
|
||||
num_processors = MIN (num_processors, GIMP_MAX_NUM_THREADS);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning Defaulting # of threads to 1
|
||||
#endif
|
||||
num_processors = 1;
|
||||
|
||||
GIMP_CONFIG_PROP_UINT (object_class, PROP_NUM_PROCESSORS,
|
||||
"num-processors",
|
||||
"Number of processors to use",
|
||||
"Number of threads to use",
|
||||
NUM_PROCESSORS_BLURB,
|
||||
1, GIMP_MAX_NUM_THREADS, num_processors,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
|
|
@ -253,7 +253,7 @@ _("Sets the size of the navigation preview available in the lower right " \
|
|||
"corner of the image window.")
|
||||
|
||||
#define NUM_PROCESSORS_BLURB \
|
||||
_("Sets how many processors GIMP should try to use simultaneously.")
|
||||
_("Sets how many threads GIMP should use for operations that support it.")
|
||||
|
||||
#define PALETTE_PATH_BLURB \
|
||||
"Sets the palette search path."
|
||||
|
|
|
@ -1080,8 +1080,18 @@ prefs_dialog_new (Gimp *gimp,
|
|||
|
||||
#ifdef ENABLE_MP
|
||||
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
|
||||
_("Number of _processors to use:"),
|
||||
_("Number of _threads to use:"),
|
||||
GTK_TABLE (table), 4, size_group);
|
||||
|
||||
vbox2 = g_object_new (GIMP_TYPE_HINT_BOX,
|
||||
"icon-name", GIMP_ICON_DIALOG_WARNING,
|
||||
"hint", _("Threading support is not yet stable.\n"
|
||||
"Setting this to greater than one might\n"
|
||||
"result in image errors or crashes."),
|
||||
NULL);
|
||||
gtk_table_attach (GTK_TABLE (table), vbox2, 1, 2, 5, 6,
|
||||
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
|
||||
gtk_widget_show (vbox2);
|
||||
#endif /* ENABLE_MP */
|
||||
|
||||
/* Hardware Acceleration */
|
||||
|
|
|
@ -49,15 +49,9 @@ gimp_gegl_init (Gimp *gimp)
|
|||
|
||||
config = GIMP_GEGL_CONFIG (gimp->config);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning not setting GeglConfig:threads
|
||||
#endif
|
||||
|
||||
g_object_set (gegl_config (),
|
||||
"tile-cache-size", (guint64) config->tile_cache_size,
|
||||
#if 0
|
||||
"threads", config->num_processors,
|
||||
#endif
|
||||
"use-opencl", config->use_opencl,
|
||||
NULL);
|
||||
|
||||
|
@ -87,11 +81,9 @@ gimp_gegl_notify_tile_cache_size (GimpGeglConfig *config)
|
|||
static void
|
||||
gimp_gegl_notify_num_processors (GimpGeglConfig *config)
|
||||
{
|
||||
#if 0
|
||||
g_object_set (gegl_config (),
|
||||
"threads", config->num_processors,
|
||||
NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue