[gimp] plug-ins: remove some crack code from curve-bend
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: remove some crack code from curve-bend
- Date: Tue, 13 Aug 2019 22:19:05 +0000 (UTC)
commit 966c49d08eda586ee51cdee5ce0c9f3428d22332
Author: Michael Natterer <mitch gimp org>
Date: Wed Aug 14 00:11:21 2019 +0200
plug-ins: remove some crack code from curve-bend
containing the last use of gimp_run_procedure().
plug-ins/common/curve-bend.c | 85 --------------------------------------------
1 file changed, 85 deletions(-)
---
diff --git a/plug-ins/common/curve-bend.c b/plug-ins/common/curve-bend.c
index 26b40d4849..2437987ea5 100644
--- a/plug-ins/common/curve-bend.c
+++ b/plug-ins/common/curve-bend.c
@@ -377,56 +377,6 @@ static int gb_debug = FALSE;
/* Functions */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDB_STUFF XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
-#ifdef ROTATE_OPTIMIZE
-
-/* ============================================================================
- * p_pdb_procedure_available
- * if requested procedure is available in the PDB return the number of args
- * (0 upto n) that are needed to call the procedure.
- * if not available return -1
- * ============================================================================
- */
-
-static gint
-p_pdb_procedure_available (const gchar *proc_name)
-{
- gint nparams;
- gint nreturn_vals;
- GimpPDBProcType proc_type;
- gchar *proc_blurb;
- gchar *proc_help;
- gchar *proc_author;
- gchar *proc_copyright;
- gchar *proc_date;
- GimpParamDef *params;
- GimpParamDef *return_vals;
- gint rc;
-
- rc = 0;
-
- /* Query the gimp application's procedural database
- * regarding a particular procedure.
- */
- if (gimp_procedural_db_proc_info (proc_name,
- &proc_blurb,
- &proc_help,
- &proc_author,
- &proc_copyright,
- &proc_date,
- &proc_type,
- &nparams, &nreturn_vals,
- ¶ms, &return_vals))
- {
- /* procedure found in PDB */
- return nparams;
- }
-
- g_printerr ("Warning: Procedure %s not found.\n", proc_name);
- return -1;
-}
-
-#endif /* ROTATE_OPTIMIZE */
-
static gint
p_gimp_rotate (gint32 image_id,
gint32 drawable_id,
@@ -436,41 +386,6 @@ p_gimp_rotate (gint32 image_id,
gdouble angle_rad;
gint rc;
-#ifdef ROTATE_OPTIMIZE
- static gchar *rotate_proc = "plug-in-rotate";
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 angle_step;
- gint nparams;
-
- if (angle_deg == 90.0) { angle_step = 1; }
- else if(angle_deg == 180.0) { angle_step = 2; }
- else if(angle_deg == 270.0) { angle_step = 3; }
- else { angle_step = 0; }
-
- if (angle_step != 0)
- {
- nparams = p_pdb_procedure_available (rotate_proc);
- if (nparams == 5)
- {
- /* use faster rotate plugin on multiples of 90 degrees */
- return_vals = gimp_run_procedure (rotate_proc,
- &nreturn_vals,
- GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
- GIMP_PDB_IMAGE, image_id,
- GIMP_PDB_DRAWABLE, drawable_id,
- GIMP_PDB_INT32, angle_step,
- GIMP_PDB_INT32, FALSE, /* don't rotate the whole image */
- GIMP_PDB_END);
-
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- {
- return 0;
- }
- }
- }
-#endif /* ROTATE_OPTIMIZE */
-
angle_rad = (angle_deg * G_PI) / 180.0;
gimp_context_push ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]