mirror of https://github.com/GNOME/gimp.git
Added basic framework for plug-ins to access the use_cpu_accel
2006-06-01 Sven Neumann <sven@gimp.org> Added basic framework for plug-ins to access the use_cpu_accel configuration (bug #342860): * app/composite/gimp-composite.[ch]: added new function gimp_composite_use_cpu_accel(). * libgimpbase/gimpprotocol.[ch]: added use_cpu_accel to the config message. * app/plug-in/gimppluginmanager-call.c: pass the return value of gimp_composite_use_cpu_accel() for config.use_cpu_accel. * libgimp/gimp.[ch]: make the config value accessible by means of a new function gimp_use_cpu_accel(). * libgimp/gimp.def: updated.
This commit is contained in:
parent
a3e967f4e8
commit
6c25ae9374
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2006-06-01 Sven Neumann <sven@gimp.org>
|
||||
|
||||
Added basic framework for plug-ins to access the use_cpu_accel
|
||||
configuration (bug #342860):
|
||||
|
||||
* app/composite/gimp-composite.[ch]: added new function
|
||||
gimp_composite_use_cpu_accel().
|
||||
|
||||
* libgimpbase/gimpprotocol.[ch]: added use_cpu_accel to the config
|
||||
message.
|
||||
|
||||
* app/plug-in/gimppluginmanager-call.c: pass the return value of
|
||||
gimp_composite_use_cpu_accel() for config.use_cpu_accel.
|
||||
|
||||
* libgimp/gimp.[ch]: make the config value accessible by means of
|
||||
a new function gimp_use_cpu_accel().
|
||||
|
||||
* libgimp/gimp.def: updated.
|
||||
|
||||
2006-06-01 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/sel_gauss.c: applied patch from Loren Merritt
|
||||
|
|
|
@ -384,3 +384,9 @@ gimp_composite_init (gboolean be_verbose,
|
|||
can_use_vis ? '+' : '-');
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_composite_use_cpu_accel (void)
|
||||
{
|
||||
return ((gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_USE) != 0);
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ extern struct GimpCompositeOptions gimp_composite_options;
|
|||
|
||||
void gimp_composite_init (gboolean be_verbose,
|
||||
gboolean use_cpu_accel);
|
||||
gboolean gimp_composite_use_cpu_accel (void);
|
||||
|
||||
void gimp_composite_dispatch (GimpCompositeContext *ctx);
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
#include "base/tile.h"
|
||||
|
||||
#include "composite/gimp-composite.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
@ -182,7 +184,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);
|
||||
config.gimp_reserved_4 = 0;
|
||||
config.use_cpu_accel = gimp_composite_use_cpu_accel ();
|
||||
config.gimp_reserved_5 = 0;
|
||||
config.gimp_reserved_6 = 0;
|
||||
config.gimp_reserved_7 = 0;
|
||||
|
|
|
@ -43,6 +43,7 @@ gimp_default_display
|
|||
gimp_wm_class
|
||||
gimp_display_name
|
||||
gimp_monitor_number
|
||||
gimp_use_cpu_accel
|
||||
gimp_get_progname
|
||||
gimp_extension_enable
|
||||
gimp_extension_ack
|
||||
|
|
|
@ -180,6 +180,7 @@ static gdouble _gamma_val = 1.0;
|
|||
static gboolean _install_cmap = FALSE;
|
||||
static gboolean _show_tool_tips = TRUE;
|
||||
static gboolean _show_help_button = TRUE;
|
||||
static gboolean _use_cpu_accel = TRUE;
|
||||
static GimpCheckSize _check_size = GIMP_CHECK_SIZE_MEDIUM_CHECKS;
|
||||
static GimpCheckType _check_type = GIMP_CHECK_TYPE_GRAY_CHECKS;
|
||||
static gint _min_colors = 144;
|
||||
|
@ -1240,6 +1241,23 @@ gimp_monitor_number (void)
|
|||
return _monitor_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_use_cpu_accel:
|
||||
*
|
||||
* Returns whether or not GIMP and its plug-ins should use
|
||||
* CPU-specific accelerated routines (MMX, SSE, Altivec...) if
|
||||
* available.
|
||||
*
|
||||
* Return value: the use_cpu_accel boolean
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
**/
|
||||
gboolean
|
||||
gimp_use_cpu_accel (void)
|
||||
{
|
||||
return _use_cpu_accel;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_get_progname:
|
||||
*
|
||||
|
@ -1693,9 +1711,10 @@ gimp_config (GPConfig *config)
|
|||
_shm_ID = config->shm_ID;
|
||||
_check_size = config->check_size;
|
||||
_check_type = config->check_type;
|
||||
_install_cmap = config->install_cmap;
|
||||
_show_tool_tips = config->show_tooltips;
|
||||
_show_help_button = config->show_help_button;
|
||||
_install_cmap = config->install_cmap ? TRUE : FALSE;
|
||||
_show_tool_tips = config->show_tooltips ? TRUE : FALSE;
|
||||
_show_help_button = config->show_help_button ? TRUE : FALSE;
|
||||
_use_cpu_accel = config->use_cpu_accel ? TRUE : FALSE;
|
||||
_min_colors = config->min_colors;
|
||||
_gdisp_ID = config->gdisp_ID;
|
||||
_wm_class = g_strdup (config->wm_class);
|
||||
|
|
|
@ -599,6 +599,7 @@ EXPORTS
|
|||
gimp_tile_width
|
||||
gimp_transform_2d
|
||||
gimp_uninstall_temp_proc
|
||||
gimp_use_cpu_accel
|
||||
gimp_vectors_bezier_stroke_conicto
|
||||
gimp_vectors_bezier_stroke_cubicto
|
||||
gimp_vectors_bezier_stroke_lineto
|
||||
|
|
|
@ -319,6 +319,7 @@ gboolean gimp_install_cmap (void) G_GNUC_CONST;
|
|||
gint gimp_min_colors (void) G_GNUC_CONST;
|
||||
gboolean gimp_show_tool_tips (void) G_GNUC_CONST;
|
||||
gboolean gimp_show_help_button (void) G_GNUC_CONST;
|
||||
gboolean gimp_use_cpu_accel (void) G_GNUC_CONST;
|
||||
GimpCheckSize gimp_check_size (void) G_GNUC_CONST;
|
||||
GimpCheckType gimp_check_type (void) G_GNUC_CONST;
|
||||
gint32 gimp_default_display (void) G_GNUC_CONST;
|
||||
|
|
|
@ -496,7 +496,7 @@ _gp_config_read (GIOChannel *channel,
|
|||
user_data))
|
||||
goto cleanup;
|
||||
if (! _gimp_wire_read_int8 (channel,
|
||||
(guint8 *) &config->gimp_reserved_4, 1,
|
||||
(guint8 *) &config->use_cpu_accel, 1,
|
||||
user_data))
|
||||
goto cleanup;
|
||||
if (! _gimp_wire_read_int8 (channel,
|
||||
|
@ -585,7 +585,7 @@ _gp_config_write (GIOChannel *channel,
|
|||
user_data))
|
||||
return;
|
||||
if (! _gimp_wire_write_int8 (channel,
|
||||
(const guint8 *) &config->gimp_reserved_4, 1,
|
||||
(const guint8 *) &config->use_cpu_accel, 1,
|
||||
user_data))
|
||||
return;
|
||||
if (! _gimp_wire_write_int8 (channel,
|
||||
|
|
|
@ -69,7 +69,7 @@ struct _GPConfig
|
|||
gint8 check_size;
|
||||
gint8 check_type;
|
||||
gint8 show_help_button;
|
||||
gint8 gimp_reserved_4;
|
||||
gint8 use_cpu_accel;
|
||||
gint8 gimp_reserved_5;
|
||||
gint8 gimp_reserved_6;
|
||||
gint8 gimp_reserved_7;
|
||||
|
|
Loading…
Reference in New Issue