Commit 57da340f authored by Michael Natterer's avatar Michael Natterer 😴

app, libgimp: pass "use-opencl" to plug-ins

and configure Gegl on the plug-in side accordingly. This bumps
the GIMP protocol version.
parent 0adccbd5
......@@ -155,6 +155,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
if (plug_in)
{
GimpCoreConfig *core_config = manager->gimp->config;
GimpGeglConfig *gegl_config = GIMP_GEGL_CONFIG (core_config);
GimpDisplayConfig *display_config = GIMP_DISPLAY_CONFIG (core_config);
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (core_config);
GPConfig config;
......@@ -191,7 +192,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
config.show_help_button = (gui_config->use_help &&
gui_config->show_help_button);
config.use_cpu_accel = manager->gimp->use_cpu_accel;
config.gimp_reserved_5 = 0;
config.use_opencl = gegl_config->use_opencl;
config.gimp_reserved_6 = 0;
config.gimp_reserved_7 = 0;
config.gimp_reserved_8 = 0;
......
......@@ -1954,6 +1954,10 @@ gimp_config (GPConfig *config)
gimp_cpu_accel_set_use (config->use_cpu_accel);
g_object_set (gegl_config (),
"use-opencl", config->use_opencl,
NULL);
if (_shm_ID != -1)
{
#if defined(USE_SYSV_SHM)
......
......@@ -499,7 +499,7 @@ _gp_config_read (GIOChannel *channel,
user_data))
goto cleanup;
if (! _gimp_wire_read_int8 (channel,
(guint8 *) &config->gimp_reserved_5, 1,
(guint8 *) &config->use_opencl, 1,
user_data))
goto cleanup;
if (! _gimp_wire_read_int8 (channel,
......@@ -591,7 +591,7 @@ _gp_config_write (GIOChannel *channel,
user_data))
return;
if (! _gimp_wire_write_int8 (channel,
(const guint8 *) &config->gimp_reserved_5, 1,
(const guint8 *) &config->use_opencl, 1,
user_data))
return;
if (! _gimp_wire_write_int8 (channel,
......
......@@ -26,7 +26,7 @@ G_BEGIN_DECLS
/* Increment every time the protocol changes
*/
#define GIMP_PROTOCOL_VERSION 0x0014
#define GIMP_PROTOCOL_VERSION 0x0015
enum
......@@ -69,7 +69,7 @@ struct _GPConfig
gint8 check_type;
gint8 show_help_button;
gint8 use_cpu_accel;
gint8 gimp_reserved_5;
gint8 use_opencl;
gint8 gimp_reserved_6;
gint8 gimp_reserved_7;
gint8 gimp_reserved_8;
......
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