[gimp] app, pdb, libgimp: remove the "plug-in precision-enabled" API and logic
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, pdb, libgimp: remove the "plug-in precision-enabled" API and logic
- Date: Fri, 19 Jul 2019 23:55:37 +0000 (UTC)
commit b2f660ae435f614083b2ad36f688702e8fe1198f
Author: Michael Natterer <mitch gimp org>
Date: Sat Jul 20 01:53:31 2019 +0200
app, pdb, libgimp: remove the "plug-in precision-enabled" API and logic
There is no old way of accessing pixels any longer, all plug-ins are
now precsion-enabled.
app/pdb/drawable-cmds.c | 23 +---------
app/pdb/drawable-color-cmds.c | 14 +-----
app/pdb/image-cmds.c | 6 ---
app/pdb/image-convert-cmds.c | 5 ---
app/pdb/internal-procs.c | 2 +-
app/pdb/plug-in-cmds.c | 96 ----------------------------------------
app/plug-in/gimpplugin-message.c | 10 -----
app/plug-in/gimpplugin.c | 16 -------
app/plug-in/gimpplugin.h | 4 --
libgimp/gimp.def | 2 -
libgimp/gimpdrawable.c | 4 --
libgimp/gimpdrawable_pdb.c | 4 +-
libgimp/gimpplugin_pdb.c | 64 ---------------------------
libgimp/gimpplugin_pdb.h | 2 -
pdb/groups/drawable.pdb | 24 +---------
pdb/groups/drawable_color.pdb | 14 +-----
pdb/groups/image.pdb | 6 ---
pdb/groups/image_convert.pdb | 5 ---
pdb/groups/plug_in.pdb | 70 +----------------------------
19 files changed, 10 insertions(+), 361 deletions(-)
---
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index aacea52332..e608ad93ee 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -71,9 +71,6 @@ drawable_get_format_invoker (GimpProcedure *procedure,
if (success)
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
/* this only transfers the encoding, losing the space, see the
* code in libgimp/gimpdrawable.c which reconstructs the actual
* format in the plug-in process
@@ -315,12 +312,6 @@ drawable_bpp_invoker (GimpProcedure *procedure,
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
bpp = babl_format_get_bytes_per_pixel (format);
}
@@ -625,12 +616,6 @@ drawable_get_pixel_invoker (GimpProcedure *procedure,
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
if (x_coord < gimp_item_get_width (GIMP_ITEM (drawable)) &&
y_coord < gimp_item_get_height (GIMP_ITEM (drawable)))
{
@@ -682,12 +667,6 @@ drawable_set_pixel_invoker (GimpProcedure *procedure,
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
if (gimp_pdb_item_is_modifiable (GIMP_ITEM (drawable),
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
@@ -1246,7 +1225,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-bpp",
"Returns the bytes per pixel.",
- "This procedure returns the number of bytes per pixel, which
corresponds to the number of components unless 'gimp-plugin-enable-precision' was called.",
+ "This procedure returns the number of bytes per pixel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
diff --git a/app/pdb/drawable-color-cmds.c b/app/pdb/drawable-color-cmds.c
index 5fa6cfa9df..d0fd7404a3 100644
--- a/app/pdb/drawable-color-cmds.c
+++ b/app/pdb/drawable-color-cmds.c
@@ -42,8 +42,6 @@
#include "operations/gimpcurvesconfig.h"
#include "operations/gimphuesaturationconfig.h"
#include "operations/gimplevelsconfig.h"
-#include "plug-in/gimpplugin.h"
-#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
@@ -404,18 +402,10 @@ drawable_histogram_invoker (GimpProcedure *procedure,
GimpHistogram *histogram;
gint n_bins;
gint start;
- gboolean precision_enabled;
GimpTRCType trc;
gint end;
- precision_enabled =
- gimp->plug_in_manager->current_plug_in &&
- gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in);
-
- if (precision_enabled)
- trc = gimp_drawable_get_trc (drawable);
- else
- trc = GIMP_TRC_NON_LINEAR;
+ trc = gimp_drawable_get_trc (drawable);
histogram = gimp_histogram_new (trc);
gimp_drawable_calculate_histogram (drawable, histogram, FALSE);
@@ -438,7 +428,7 @@ drawable_histogram_invoker (GimpProcedure *procedure,
g_object_unref (histogram);
- if (n_bins == 256 || ! precision_enabled)
+ if (n_bins == 256)
{
mean *= 255;
std_dev *= 255;
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 969c153f41..bed0106da8 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -194,9 +194,6 @@ image_new_with_precision_invoker (GimpProcedure *procedure,
if (success)
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
if (gimp_babl_is_valid (type, precision))
{
image = gimp_create_image (gimp, width, height, type,
@@ -320,9 +317,6 @@ image_get_precision_invoker (GimpProcedure *procedure,
if (success)
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
precision = gimp_image_get_precision (image);
}
diff --git a/app/pdb/image-convert-cmds.c b/app/pdb/image-convert-cmds.c
index d379032f1e..0e52668997 100644
--- a/app/pdb/image-convert-cmds.c
+++ b/app/pdb/image-convert-cmds.c
@@ -36,8 +36,6 @@
#include "core/gimppalette.h"
#include "core/gimpparamspecs.h"
#include "gegl/gimp-babl.h"
-#include "plug-in/gimpplugin.h"
-#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdberror.h"
@@ -242,9 +240,6 @@ image_convert_precision_invoker (GimpProcedure *procedure,
if (success)
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
if (gimp_pdb_image_is_not_base_type (image, GIMP_INDEXED, error) &&
gimp_pdb_image_is_not_precision (image, precision, error) &&
gimp_babl_is_valid (gimp_image_get_base_type (image), precision))
diff --git a/app/pdb/internal-procs.c b/app/pdb/internal-procs.c
index 3db3f2bff3..113c95cae2 100644
--- a/app/pdb/internal-procs.c
+++ b/app/pdb/internal-procs.c
@@ -28,7 +28,7 @@
#include "internal-procs.h"
-/* 745 procedures registered total */
+/* 743 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
diff --git a/app/pdb/plug-in-cmds.c b/app/pdb/plug-in-cmds.c
index 5013617622..9551ab0d01 100644
--- a/app/pdb/plug-in-cmds.c
+++ b/app/pdb/plug-in-cmds.c
@@ -344,62 +344,6 @@ plugin_get_pdb_error_handler_invoker (GimpProcedure *procedure,
return return_vals;
}
-static GimpValueArray *
-plugin_enable_precision_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
-
- if (plug_in)
- {
- gimp_plug_in_enable_precision (plug_in);
- }
- else
- {
- success = FALSE;
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GimpValueArray *
-plugin_precision_enabled_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpValueArray *return_vals;
- gboolean enabled = FALSE;
-
- GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
-
- if (plug_in)
- {
- enabled = gimp_plug_in_precision_enabled (plug_in);
- }
- else
- {
- success = FALSE;
- }
-
- return_vals = gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-
- if (success)
- g_value_set_boolean (gimp_value_array_index (return_vals, 1), enabled);
-
- return return_vals;
-}
-
void
register_plug_in_procs (GimpPDB *pdb)
{
@@ -708,44 +652,4 @@ register_plug_in_procs (GimpPDB *pdb)
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
-
- /*
- * gimp-plugin-enable-precision
- */
- procedure = gimp_procedure_new (plugin_enable_precision_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-plugin-enable-precision");
- gimp_procedure_set_static_strings (procedure,
- "gimp-plugin-enable-precision",
- "Switches this plug-in to using the real bit depth of drawables.",
- "Switches this plug-in to using the real bit depth of drawables. This
setting can only be enabled, and not disabled again during the lifetime of the plug-in. Using
'gimp-drawable-get-buffer', 'gimp-drawable-get-shadow-buffer' or 'gimp-drawable-get-format' will
automatically call this function.",
- "Michael Natterer <mitch gimp org>",
- "Michael Natterer",
- "2012",
- NULL);
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
- * gimp-plugin-precision-enabled
- */
- procedure = gimp_procedure_new (plugin_precision_enabled_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-plugin-precision-enabled");
- gimp_procedure_set_static_strings (procedure,
- "gimp-plugin-precision-enabled",
- "Whether this plug-in is using the real bit depth of drawables.",
- "Returns whether this plug-in is using the real bit depth of drawables,
which can be more than 8 bits per channel.",
- "Michael Natterer <mitch gimp org>",
- "Michael Natterer",
- "2012",
- NULL);
- gimp_procedure_add_return_value (procedure,
- g_param_spec_boolean ("enabled",
- "enabled",
- "Whether precision is enabled",
- FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
}
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index fd53482887..0ee2c5d3e3 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -315,11 +315,6 @@ gimp_plug_in_handle_tile_put (GimpPlugIn *plug_in,
format = gegl_buffer_get_format (buffer);
- if (! gimp_plug_in_precision_enabled (plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
if (tile_data.use_shm)
{
gegl_buffer_set (buffer, &tile_rect, 0, format,
@@ -411,11 +406,6 @@ gimp_plug_in_handle_tile_get (GimpPlugIn *plug_in,
format = gegl_buffer_get_format (buffer);
- if (! gimp_plug_in_precision_enabled (plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
tile_size = (babl_format_get_bytes_per_pixel (format) *
tile_rect.width * tile_rect.height);
diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c
index b74b6e4089..55fee9fd0f 100644
--- a/app/plug-in/gimpplugin.c
+++ b/app/plug-in/gimpplugin.c
@@ -1047,19 +1047,3 @@ gimp_plug_in_get_error_handler (GimpPlugIn *plug_in)
return GIMP_PDB_ERROR_HANDLER_INTERNAL;
}
-
-void
-gimp_plug_in_enable_precision (GimpPlugIn *plug_in)
-{
- g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
-
- plug_in->precision = TRUE;
-}
-
-gboolean
-gimp_plug_in_precision_enabled (GimpPlugIn *plug_in)
-{
- g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), FALSE);
-
- return plug_in->precision;
-}
diff --git a/app/plug-in/gimpplugin.h b/app/plug-in/gimpplugin.h
index 15326a0f6e..2cd3756467 100644
--- a/app/plug-in/gimpplugin.h
+++ b/app/plug-in/gimpplugin.h
@@ -47,7 +47,6 @@ struct _GimpPlugIn
GimpPlugInCallMode call_mode; /* QUERY, INIT or RUN */
guint open : 1; /* Is the plug-in open? */
guint hup : 1; /* Did we receive a G_IO_HUP */
- guint precision : 1; /* True drawable precision enabled */
GPid pid; /* Plug-in's process id */
GIOChannel *my_read; /* App's read and write channels */
@@ -120,8 +119,5 @@ void gimp_plug_in_set_error_handler (GimpPlugIn *plug_in,
GimpPDBErrorHandler
gimp_plug_in_get_error_handler (GimpPlugIn *plug_in);
-void gimp_plug_in_enable_precision (GimpPlugIn *plug_in);
-gboolean gimp_plug_in_precision_enabled (GimpPlugIn *plug_in);
-
#endif /* __GIMP_PLUG_IN_H__ */
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index 86072aeb57..0fadcae00a 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -586,13 +586,11 @@ EXPORTS
gimp_patterns_set_popup
gimp_pencil
gimp_plugin_domain_register
- gimp_plugin_enable_precision
gimp_plugin_get_pdb_error_handler
gimp_plugin_help_register
gimp_plugin_icon_register
gimp_plugin_menu_branch_register
gimp_plugin_menu_register
- gimp_plugin_precision_enabled
gimp_plugin_set_pdb_error_handler
gimp_procedural_db_dump
gimp_procedural_db_get_data
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index a2223cfc1c..fe841588f5 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -103,8 +103,6 @@ gimp_drawable_get_sub_thumbnail_data (gint32 drawable_ID,
GeglBuffer *
gimp_drawable_get_buffer (gint32 drawable_ID)
{
- gimp_plugin_enable_precision ();
-
if (gimp_item_is_valid (drawable_ID))
{
GeglTileBackend *backend;
@@ -138,8 +136,6 @@ gimp_drawable_get_buffer (gint32 drawable_ID)
GeglBuffer *
gimp_drawable_get_shadow_buffer (gint32 drawable_ID)
{
- gimp_plugin_enable_precision ();
-
if (gimp_item_is_valid (drawable_ID))
{
GeglTileBackend *backend;
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index 1a9fd17cc4..61e736b249 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -299,9 +299,7 @@ gimp_drawable_is_indexed (gint32 drawable_ID)
*
* Returns the bytes per pixel.
*
- * This procedure returns the number of bytes per pixel, which
- * corresponds to the number of components unless
- * gimp_plugin_enable_precision() was called.
+ * This procedure returns the number of bytes per pixel.
*
* Returns: Bytes per pixel.
**/
diff --git a/libgimp/gimpplugin_pdb.c b/libgimp/gimpplugin_pdb.c
index 0cf6766e43..6998a55679 100644
--- a/libgimp/gimpplugin_pdb.c
+++ b/libgimp/gimpplugin_pdb.c
@@ -291,67 +291,3 @@ gimp_plugin_get_pdb_error_handler (void)
return handler;
}
-
-/**
- * gimp_plugin_enable_precision:
- *
- * Switches this plug-in to using the real bit depth of drawables.
- *
- * Switches this plug-in to using the real bit depth of drawables. This
- * setting can only be enabled, and not disabled again during the
- * lifetime of the plug-in. Using gimp_drawable_get_buffer(),
- * gimp_drawable_get_shadow_buffer() or gimp_drawable_get_format() will
- * automatically call this function.
- *
- * Returns: TRUE on success.
- *
- * Since: 2.10
- **/
-gboolean
-gimp_plugin_enable_precision (void)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean success = TRUE;
-
- return_vals = gimp_run_procedure ("gimp-plugin-enable-precision",
- &nreturn_vals,
- GIMP_PDB_END);
-
- success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return success;
-}
-
-/**
- * gimp_plugin_precision_enabled:
- *
- * Whether this plug-in is using the real bit depth of drawables.
- *
- * Returns whether this plug-in is using the real bit depth of
- * drawables, which can be more than 8 bits per channel.
- *
- * Returns: Whether precision is enabled.
- *
- * Since: 2.10
- **/
-gboolean
-gimp_plugin_precision_enabled (void)
-{
- GimpParam *return_vals;
- gint nreturn_vals;
- gboolean enabled = FALSE;
-
- return_vals = gimp_run_procedure ("gimp-plugin-precision-enabled",
- &nreturn_vals,
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- enabled = return_vals[1].data.d_int32;
-
- gimp_destroy_params (return_vals, nreturn_vals);
-
- return enabled;
-}
diff --git a/libgimp/gimpplugin_pdb.h b/libgimp/gimpplugin_pdb.h
index 97b83d8b55..0f08e8158b 100644
--- a/libgimp/gimpplugin_pdb.h
+++ b/libgimp/gimpplugin_pdb.h
@@ -46,8 +46,6 @@ G_GNUC_INTERNAL gboolean _gimp_plugin_icon_register (const gchar
const guint8 *icon_data);
gboolean gimp_plugin_set_pdb_error_handler (GimpPDBErrorHandler handler);
GimpPDBErrorHandler gimp_plugin_get_pdb_error_handler (void);
-gboolean gimp_plugin_enable_precision (void);
-gboolean gimp_plugin_precision_enabled (void);
G_END_DECLS
diff --git a/pdb/groups/drawable.pdb b/pdb/groups/drawable.pdb
index 833e50dfb5..2be0a5d52d 100644
--- a/pdb/groups/drawable.pdb
+++ b/pdb/groups/drawable.pdb
@@ -294,9 +294,6 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
/* this only transfers the encoding, losing the space, see the
* code in libgimp/gimpdrawable.c which reconstructs the actual
* format in the plug-in process
@@ -521,8 +518,7 @@ sub drawable_bpp {
$blurb = 'Returns the bytes per pixel.';
$help = <<'HELP';
-This procedure returns the number of bytes per pixel, which corresponds to
-the number of components unless gimp_plugin_enable_precision() was called.
+This procedure returns the number of bytes per pixel.
HELP
&std_pdb_misc;
@@ -542,12 +538,6 @@ HELP
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
bpp = babl_format_get_bytes_per_pixel (format);
}
CODE
@@ -669,12 +659,6 @@ HELP
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
if (x_coord < gimp_item_get_width (GIMP_ITEM (drawable)) &&
y_coord < gimp_item_get_height (GIMP_ITEM (drawable)))
{
@@ -723,12 +707,6 @@ HELP
{
const Babl *format = gimp_drawable_get_format (drawable);
- if (! gimp->plug_in_manager->current_plug_in ||
- ! gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in))
- {
- format = gimp_babl_compat_u8_format (format);
- }
-
if (gimp_pdb_item_is_modifiable (GIMP_ITEM (drawable),
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
diff --git a/pdb/groups/drawable_color.pdb b/pdb/groups/drawable_color.pdb
index ff68c96198..74993897a8 100644
--- a/pdb/groups/drawable_color.pdb
+++ b/pdb/groups/drawable_color.pdb
@@ -450,18 +450,10 @@ HELP
GimpHistogram *histogram;
gint n_bins;
gint start;
- gboolean precision_enabled;
GimpTRCType trc;
gint end;
- precision_enabled =
- gimp->plug_in_manager->current_plug_in &&
- gimp_plug_in_precision_enabled (gimp->plug_in_manager->current_plug_in);
-
- if (precision_enabled)
- trc = gimp_drawable_get_trc (drawable);
- else
- trc = GIMP_TRC_NON_LINEAR;
+ trc = gimp_drawable_get_trc (drawable);
histogram = gimp_histogram_new (trc);
gimp_drawable_calculate_histogram (drawable, histogram, FALSE);
@@ -484,7 +476,7 @@ HELP
g_object_unref (histogram);
- if (n_bins == 256 || ! precision_enabled)
+ if (n_bins == 256)
{
mean *= 255;
std_dev *= 255;
@@ -814,8 +806,6 @@ CODE
"core/gimp.h"
"core/gimpdrawable.h"
"core/gimpdrawable-operation.h"
- "plug-in/gimpplugin.h"
- "plug-in/gimppluginmanager.h"
"gimppdb-utils.h"
"gimp-intl.h");
diff --git a/pdb/groups/image.pdb b/pdb/groups/image.pdb
index e3beb17d16..eb80393bb0 100644
--- a/pdb/groups/image.pdb
+++ b/pdb/groups/image.pdb
@@ -159,9 +159,6 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
if (gimp_babl_is_valid (type, precision))
{
image = gimp_create_image (gimp, width, height, type,
@@ -1386,9 +1383,6 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
precision = gimp_image_get_precision (image);
}
CODE
diff --git a/pdb/groups/image_convert.pdb b/pdb/groups/image_convert.pdb
index 02ed05e2be..31ee890101 100644
--- a/pdb/groups/image_convert.pdb
+++ b/pdb/groups/image_convert.pdb
@@ -239,9 +239,6 @@ HELP
%invoke = (
code => <<'CODE'
{
- if (gimp->plug_in_manager->current_plug_in)
- gimp_plug_in_enable_precision (gimp->plug_in_manager->current_plug_in);
-
if (gimp_pdb_image_is_not_base_type (image, GIMP_INDEXED, error) &&
gimp_pdb_image_is_not_precision (image, precision, error) &&
gimp_babl_is_valid (gimp_image_get_base_type (image), precision))
@@ -269,8 +266,6 @@ CODE
"core/gimpimage-convert-type.h"
"core/gimpitemstack.h"
"core/gimppalette.h"
- "plug-in/gimpplugin.h"
- "plug-in/gimppluginmanager.h"
"gimppdberror.h"
"gimppdb-utils.h"
"gimp-intl.h");
diff --git a/pdb/groups/plug_in.pdb b/pdb/groups/plug_in.pdb
index 5addf6ac85..9fbf572370 100644
--- a/pdb/groups/plug_in.pdb
+++ b/pdb/groups/plug_in.pdb
@@ -353,70 +353,6 @@ CODE
);
}
-sub plugin_enable_precision {
- $blurb = "Switches this plug-in to using the real bit depth of drawables.";
-
- $help = <<HELP;
-Switches this plug-in to using the real bit depth of drawables. This
-setting can only be enabled, and not disabled again during the
-lifetime of the plug-in. Using gimp_drawable_get_buffer(),
-gimp_drawable_get_shadow_buffer() or gimp_drawable_get_format() will
-automatically call this function.
-HELP
-
- &mitch_pdb_misc('2012', '2.10');
-
- %invoke = (
- code => <<'CODE'
-{
- GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
-
- if (plug_in)
- {
- gimp_plug_in_enable_precision (plug_in);
- }
- else
- {
- success = FALSE;
- }
-}
-CODE
- );
-}
-
-sub plugin_precision_enabled {
- $blurb = "Whether this plug-in is using the real bit depth of drawables.";
-
- $help = <<HELP;
-Returns whether this plug-in is using the real bit depth of drawables,
-which can be more than 8 bits per channel.
-HELP
-
- &mitch_pdb_misc('2012', '2.10');
-
- @outargs = (
- { name => 'enabled', type => 'boolean',
- desc => "Whether precision is enabled" }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
-
- if (plug_in)
- {
- enabled = gimp_plug_in_precision_enabled (plug_in);
- }
- else
- {
- success = FALSE;
- }
-}
-CODE
- );
-}
-
@headers = qw(<string.h>
<stdlib.h>
"libgimpbase/gimpbase.h"
@@ -435,11 +371,9 @@ CODE
plugin_menu_branch_register
plugin_icon_register
plugin_set_pdb_error_handler
- plugin_get_pdb_error_handler
- plugin_enable_precision
- plugin_precision_enabled);
+ plugin_get_pdb_error_handler);
-%exports = (app => [@procs], lib => [@procs[1,2,3,4,5,6,7,8,9]]);
+%exports = (app => [@procs], lib => [@procs[1,2,3,4,5,6,7]]);
$desc = 'Plug-in';
$doc_title = 'gimpplugin';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]