[gimp] app: use the "no-cpu-accel" command line option again
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use the "no-cpu-accel" command line option again
- Date: Wed, 19 Jun 2013 18:46:18 +0000 (UTC)
commit 3cf2c4dd87773514d21ee3d4032eb1e2a03c96d6
Author: Michael Natterer <mitch gimp org>
Date: Wed Jun 19 20:42:56 2013 +0200
app: use the "no-cpu-accel" command line option again
Call gimp_cpu_accel_set_use() in app_run(). Add "use_cpu_accel"
parameter to gimp_new() and keep it around in the Gimp instance. Pass
the flag to plug-ins again.
app/app.c | 3 +++
app/core/gimp.c | 3 +++
app/core/gimp.h | 2 ++
app/plug-in/gimppluginmanager-call.c | 5 +----
app/tests.c | 4 ++--
5 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/app/app.c b/app/app.c
index 96c08bb..50e9369 100644
--- a/app/app.c
+++ b/app/app.c
@@ -176,10 +176,13 @@ app_run (const gchar *full_prog_name,
no_fonts,
no_interface,
use_shm,
+ use_cpu_accel,
console_messages,
stack_trace_mode,
pdb_compat_mode);
+ gimp_cpu_accel_set_use (use_cpu_accel);
+
errors_init (gimp, full_prog_name, use_debug_handler, stack_trace_mode);
units_init (gimp);
diff --git a/app/core/gimp.c b/app/core/gimp.c
index 69d024d..aaea107 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -198,6 +198,7 @@ gimp_init (Gimp *gimp)
gimp->no_interface = FALSE;
gimp->show_gui = TRUE;
gimp->use_shm = FALSE;
+ gimp->use_cpu_accel = TRUE;
gimp->message_handler = GIMP_CONSOLE;
gimp->stack_trace_mode = GIMP_STACK_TRACE_NEVER;
gimp->pdb_compat_mode = GIMP_PDB_COMPAT_OFF;
@@ -759,6 +760,7 @@ gimp_new (const gchar *name,
gboolean no_fonts,
gboolean no_interface,
gboolean use_shm,
+ gboolean use_cpu_accel,
gboolean console_messages,
GimpStackTraceMode stack_trace_mode,
GimpPDBCompatMode pdb_compat_mode)
@@ -778,6 +780,7 @@ gimp_new (const gchar *name,
gimp->no_fonts = no_fonts ? TRUE : FALSE;
gimp->no_interface = no_interface ? TRUE : FALSE;
gimp->use_shm = use_shm ? TRUE : FALSE;
+ gimp->use_cpu_accel = use_cpu_accel ? TRUE : FALSE;
gimp->console_messages = console_messages ? TRUE : FALSE;
gimp->stack_trace_mode = stack_trace_mode;
gimp->pdb_compat_mode = pdb_compat_mode;
diff --git a/app/core/gimp.h b/app/core/gimp.h
index c567cd4..dd96409 100644
--- a/app/core/gimp.h
+++ b/app/core/gimp.h
@@ -49,6 +49,7 @@ struct _Gimp
gboolean no_interface;
gboolean show_gui;
gboolean use_shm;
+ gboolean use_cpu_accel;
GimpMessageHandlerType message_handler;
gboolean console_messages;
GimpStackTraceMode stack_trace_mode;
@@ -151,6 +152,7 @@ Gimp * gimp_new (const gchar *name,
gboolean no_fonts,
gboolean no_interface,
gboolean use_shm,
+ gboolean use_cpu_accel,
gboolean console_messages,
GimpStackTraceMode stack_trace_mode,
GimpPDBCompatMode pdb_compat_mode);
diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c
index 429cdcb..c36689a 100644
--- a/app/plug-in/gimppluginmanager-call.c
+++ b/app/plug-in/gimppluginmanager-call.c
@@ -189,10 +189,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
config.check_type = display_config->transparency_type;
config.show_help_button = (gui_config->use_help &&
gui_config->show_help_button);
-#ifdef __GNUC__
-#warning FIXME what to do with config.use_cpu_accel
-#endif
- config.use_cpu_accel = FALSE;
+ config.use_cpu_accel = manager->gimp->use_cpu_accel;
config.gimp_reserved_5 = 0;
config.gimp_reserved_6 = 0;
config.gimp_reserved_7 = 0;
diff --git a/app/tests.c b/app/tests.c
index 48b44a2..4db041c 100644
--- a/app/tests.c
+++ b/app/tests.c
@@ -66,7 +66,7 @@ gimp_init_for_testing (void)
gegl_init (NULL, NULL);
gimp = gimp_new ("Unit Tested GIMP", NULL, NULL, FALSE, TRUE, TRUE, TRUE,
- FALSE, TRUE, TRUE, FALSE);
+ FALSE, FALSE, TRUE, TRUE, FALSE);
units_init (gimp);
@@ -99,7 +99,7 @@ gimp_init_for_gui_testing_internal (gboolean show_gui,
/* from app_run() */
gimp = gimp_new ("Unit Tested GIMP", NULL, NULL, FALSE, TRUE, TRUE, !show_gui,
- FALSE, TRUE, TRUE, FALSE);
+ FALSE, FALSE, TRUE, TRUE, FALSE);
gimp_set_show_gui (gimp, show_gui);
units_init (gimp);
gimp_load_config (gimp, gimprc, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]