[gimp] app: remove prepare() implementations from all layer mode operations



commit 9de6e41abb1c2a918446a64edda94dc9d33daa1a
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 26 23:48:05 2013 +0200

    app: remove prepare() implementations from all layer mode operations
    
    so the one in GimpOperationPointLayerMode is used which can switch
    between RGBA and R'G'B'A.

 app/operations/gimpoperationadditionmode.c     |   15 +----------
 app/operations/gimpoperationburnmode.c         |   15 +----------
 app/operations/gimpoperationcolorerasemode.c   |   15 +----------
 app/operations/gimpoperationcolormode.c        |   15 +----------
 app/operations/gimpoperationdarkenonlymode.c   |   15 +----------
 app/operations/gimpoperationdifferencemode.c   |   15 +----------
 app/operations/gimpoperationdissolvemode.c     |   14 +----------
 app/operations/gimpoperationdividemode.c       |   15 +----------
 app/operations/gimpoperationdodgemode.c        |   15 +----------
 app/operations/gimpoperationgrainextractmode.c |   16 +-----------
 app/operations/gimpoperationgrainmergemode.c   |   16 +-----------
 app/operations/gimpoperationhardlightmode.c    |   15 +----------
 app/operations/gimpoperationhuemode.c          |   15 +----------
 app/operations/gimpoperationlightenonlymode.c  |   15 +----------
 app/operations/gimpoperationmultiplymode.c     |   15 +----------
 app/operations/gimpoperationoverlaymode.c      |   15 +----------
 app/operations/gimpoperationreplacemode.c      |   31 +++++++-----------------
 app/operations/gimpoperationsaturationmode.c   |   15 +----------
 app/operations/gimpoperationscreenmode.c       |   15 +----------
 app/operations/gimpoperationsoftlightmode.c    |   15 +----------
 app/operations/gimpoperationsubtractmode.c     |   15 +----------
 app/operations/gimpoperationvaluemode.c        |   15 +----------
 22 files changed, 30 insertions(+), 317 deletions(-)
---
diff --git a/app/operations/gimpoperationadditionmode.c b/app/operations/gimpoperationadditionmode.c
index 12ad623..7c24c02 100644
--- a/app/operations/gimpoperationadditionmode.c
+++ b/app/operations/gimpoperationadditionmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationadditionmode.h"
 
 
-static void gimp_operation_addition_mode_prepare     (GeglOperation       *operation);
 static gboolean gimp_operation_addition_mode_process (GeglOperation       *operation,
                                                       void                *in_buf,
                                                       void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_addition_mode_class_init (GimpOperationAdditionModeClass *klass)
                                  "description", "GIMP addition mode operation",
                                  NULL);
 
-  point_class->process     = gimp_operation_addition_mode_process;
-  operation_class->prepare = gimp_operation_addition_mode_prepare;
+  point_class->process = gimp_operation_addition_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_addition_mode_init (GimpOperationAdditionMode *self)
 {
 }
 
-static void
-gimp_operation_addition_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_addition_mode_process (GeglOperation       *operation,
                                       void                *in_buf,
diff --git a/app/operations/gimpoperationburnmode.c b/app/operations/gimpoperationburnmode.c
index c16da46..1937951 100644
--- a/app/operations/gimpoperationburnmode.c
+++ b/app/operations/gimpoperationburnmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationburnmode.h"
 
 
-static void     gimp_operation_burn_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_burn_mode_process (GeglOperation       *operation,
                                                   void                *in_buf,
                                                   void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_burn_mode_class_init (GimpOperationBurnModeClass *klass)
                                  "description", "GIMP burn mode operation",
                                  NULL);
 
-  point_class->process     = gimp_operation_burn_mode_process;
-  operation_class->prepare = gimp_operation_burn_mode_prepare;
+  point_class->process = gimp_operation_burn_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_burn_mode_init (GimpOperationBurnMode *self)
 {
 }
 
-static void
-gimp_operation_burn_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_burn_mode_process (GeglOperation       *operation,
                                   void                *in_buf,
diff --git a/app/operations/gimpoperationcolorerasemode.c b/app/operations/gimpoperationcolorerasemode.c
index 1f9e70c..a832437 100644
--- a/app/operations/gimpoperationcolorerasemode.c
+++ b/app/operations/gimpoperationcolorerasemode.c
@@ -33,7 +33,6 @@
 #include "gimpoperationcolorerasemode.h"
 
 
-static void     gimp_operation_color_erase_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_color_erase_mode_process (GeglOperation       *operation,
                                                          void                *in_buf,
                                                          void                *aux_buf,
@@ -62,8 +61,7 @@ gimp_operation_color_erase_mode_class_init (GimpOperationColorEraseModeClass *kl
                                  "description", "GIMP color erase mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_color_erase_mode_prepare;
-  point_class->process     = gimp_operation_color_erase_mode_process;
+  point_class->process = gimp_operation_color_erase_mode_process;
 }
 
 static void
@@ -71,17 +69,6 @@ gimp_operation_color_erase_mode_init (GimpOperationColorEraseMode *self)
 {
 }
 
-static void
-gimp_operation_color_erase_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_color_erase_mode_process (GeglOperation       *operation,
                                          void                *in_buf,
diff --git a/app/operations/gimpoperationcolormode.c b/app/operations/gimpoperationcolormode.c
index e4a7dbe..ad787f5 100644
--- a/app/operations/gimpoperationcolormode.c
+++ b/app/operations/gimpoperationcolormode.c
@@ -33,7 +33,6 @@
 #include "gimpoperationcolormode.h"
 
 
-static void     gimp_operation_color_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_color_mode_process (GeglOperation       *operation,
                                                    void                *in_buf,
                                                    void                *aux_buf,
@@ -62,8 +61,7 @@ gimp_operation_color_mode_class_init (GimpOperationColorModeClass *klass)
                                  "description", "GIMP color mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_color_mode_prepare;
-  point_class->process     = gimp_operation_color_mode_process;
+  point_class->process = gimp_operation_color_mode_process;
 }
 
 static void
@@ -71,17 +69,6 @@ gimp_operation_color_mode_init (GimpOperationColorMode *self)
 {
 }
 
-static void
-gimp_operation_color_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_color_mode_process (GeglOperation       *operation,
                                    void                *in_buf,
diff --git a/app/operations/gimpoperationdarkenonlymode.c b/app/operations/gimpoperationdarkenonlymode.c
index 8945e62..3700410 100644
--- a/app/operations/gimpoperationdarkenonlymode.c
+++ b/app/operations/gimpoperationdarkenonlymode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationdarkenonlymode.h"
 
 
-static void     gimp_operation_darken_only_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_darken_only_mode_process (GeglOperation       *operation,
                                                          void                *in_buf,
                                                          void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_darken_only_mode_class_init (GimpOperationDarkenOnlyModeClass *kl
                                  "description", "GIMP darken only mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_darken_only_mode_prepare;
-  point_class->process     = gimp_operation_darken_only_mode_process;
+  point_class->process = gimp_operation_darken_only_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_darken_only_mode_init (GimpOperationDarkenOnlyMode *self)
 {
 }
 
-static void
-gimp_operation_darken_only_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_darken_only_mode_process (GeglOperation       *operation,
                                          void                *in_buf,
diff --git a/app/operations/gimpoperationdifferencemode.c b/app/operations/gimpoperationdifferencemode.c
index 295dc1b..1fa065b 100644
--- a/app/operations/gimpoperationdifferencemode.c
+++ b/app/operations/gimpoperationdifferencemode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationdifferencemode.h"
 
 
-static void     gimp_operation_difference_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_difference_mode_process (GeglOperation       *operation,
                                                         void                *in_buf,
                                                         void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_difference_mode_class_init (GimpOperationDifferenceModeClass *kla
                                  "description", "GIMP difference mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_difference_mode_prepare;
-  point_class->process     = gimp_operation_difference_mode_process;
+  point_class->process = gimp_operation_difference_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_difference_mode_init (GimpOperationDifferenceMode *self)
 {
 }
 
-static void
-gimp_operation_difference_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_difference_mode_process (GeglOperation       *operation,
                                         void                *in_buf,
diff --git a/app/operations/gimpoperationdissolvemode.c b/app/operations/gimpoperationdissolvemode.c
index bc264b5..f6500a2 100644
--- a/app/operations/gimpoperationdissolvemode.c
+++ b/app/operations/gimpoperationdissolvemode.c
@@ -32,7 +32,7 @@
 
 #define RANDOM_TABLE_SIZE 4096
 
-static void     gimp_operation_dissolve_mode_prepare (GeglOperation       *operation);
+
 static gboolean gimp_operation_dissolve_mode_process (GeglOperation       *operation,
                                                       void                *in_buf,
                                                       void                *aux_buf,
@@ -66,7 +66,6 @@ gimp_operation_dissolve_mode_class_init (GimpOperationDissolveModeClass *klass)
                                  "categories",  "compositors",
                                  NULL);
 
-  operation_class->prepare      = gimp_operation_dissolve_mode_prepare;
   point_composer_class->process = gimp_operation_dissolve_mode_process;
 
   /* generate a table of random seeds */
@@ -82,17 +81,6 @@ gimp_operation_dissolve_mode_init (GimpOperationDissolveMode *self)
 {
 }
 
-static void
-gimp_operation_dissolve_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_dissolve_mode_process (GeglOperation       *operation,
                                       void                *in_buf,
diff --git a/app/operations/gimpoperationdividemode.c b/app/operations/gimpoperationdividemode.c
index 597d61f..87ac6da 100644
--- a/app/operations/gimpoperationdividemode.c
+++ b/app/operations/gimpoperationdividemode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationdividemode.h"
 
 
-static void     gimp_operation_divide_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_divide_mode_process (GeglOperation       *operation,
                                                     void                *in_buf,
                                                     void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_divide_mode_class_init (GimpOperationDivideModeClass *klass)
                                  "description", "GIMP divide mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_divide_mode_prepare;
-  point_class->process     = gimp_operation_divide_mode_process;
+  point_class->process = gimp_operation_divide_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_divide_mode_init (GimpOperationDivideMode *self)
 {
 }
 
-static void
-gimp_operation_divide_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_divide_mode_process (GeglOperation       *operation,
                                     void                *in_buf,
diff --git a/app/operations/gimpoperationdodgemode.c b/app/operations/gimpoperationdodgemode.c
index bdaeec6..24d9902 100644
--- a/app/operations/gimpoperationdodgemode.c
+++ b/app/operations/gimpoperationdodgemode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationdodgemode.h"
 
 
-static void     gimp_operation_dodge_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_dodge_mode_process (GeglOperation       *operation,
                                                    void                *in_buf,
                                                    void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_dodge_mode_class_init (GimpOperationDodgeModeClass *klass)
                                  "description", "GIMP dodge mode operation",
                                  NULL);
 
-  point_class->process     = gimp_operation_dodge_mode_process;
-  operation_class->prepare = gimp_operation_dodge_mode_prepare;
+  point_class->process = gimp_operation_dodge_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_dodge_mode_init (GimpOperationDodgeMode *self)
 {
 }
 
-static void
-gimp_operation_dodge_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_dodge_mode_process (GeglOperation       *operation,
                                    void                *in_buf,
diff --git a/app/operations/gimpoperationgrainextractmode.c b/app/operations/gimpoperationgrainextractmode.c
index 1f1cf9f..777b4f6 100644
--- a/app/operations/gimpoperationgrainextractmode.c
+++ b/app/operations/gimpoperationgrainextractmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationgrainextractmode.h"
 
 
-static void     gimp_operation_grain_extract_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_grain_extract_mode_process (GeglOperation       *operation,
                                                            void                *in_buf,
                                                            void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_grain_extract_mode_class_init (GimpOperationGrainExtractModeClass
                                  "description", "GIMP grain extract mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_grain_extract_mode_prepare;
-  point_class->process     = gimp_operation_grain_extract_mode_process;
+  point_class->process = gimp_operation_grain_extract_mode_process;
 }
 
 static void
@@ -67,18 +65,6 @@ gimp_operation_grain_extract_mode_init (GimpOperationGrainExtractMode *self)
 {
 }
 
-static void
-gimp_operation_grain_extract_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
-
 static gboolean
 gimp_operation_grain_extract_mode_process (GeglOperation       *operation,
                                            void                *in_buf,
diff --git a/app/operations/gimpoperationgrainmergemode.c b/app/operations/gimpoperationgrainmergemode.c
index b270190..dba3e9b 100644
--- a/app/operations/gimpoperationgrainmergemode.c
+++ b/app/operations/gimpoperationgrainmergemode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationgrainmergemode.h"
 
 
-static void     gimp_operation_grain_merge_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_grain_merge_mode_process (GeglOperation       *operation,
                                                          void                *in_buf,
                                                          void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_grain_merge_mode_class_init (GimpOperationGrainMergeModeClass *kl
                                  "description", "GIMP grain merge mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_grain_merge_mode_prepare;
-  point_class->process     = gimp_operation_grain_merge_mode_process;
+  point_class->process = gimp_operation_grain_merge_mode_process;
 }
 
 static void
@@ -67,18 +65,6 @@ gimp_operation_grain_merge_mode_init (GimpOperationGrainMergeMode *self)
 {
 }
 
-static void
-gimp_operation_grain_merge_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
-
 static gboolean
 gimp_operation_grain_merge_mode_process (GeglOperation       *operation,
                                          void                *in_buf,
diff --git a/app/operations/gimpoperationhardlightmode.c b/app/operations/gimpoperationhardlightmode.c
index 8ae8f9b..30b8762 100644
--- a/app/operations/gimpoperationhardlightmode.c
+++ b/app/operations/gimpoperationhardlightmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationhardlightmode.h"
 
 
-static void     gimp_operation_hardlight_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_hardlight_mode_process (GeglOperation       *operation,
                                                        void                *in_buf,
                                                        void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_hardlight_mode_class_init (GimpOperationHardlightModeClass *klass
                                  "description", "GIMP hardlight mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_hardlight_mode_prepare;
-  point_class->process     = gimp_operation_hardlight_mode_process;
+  point_class->process = gimp_operation_hardlight_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_hardlight_mode_init (GimpOperationHardlightMode *self)
 {
 }
 
-static void
-gimp_operation_hardlight_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_hardlight_mode_process (GeglOperation       *operation,
                                        void                *in_buf,
diff --git a/app/operations/gimpoperationhuemode.c b/app/operations/gimpoperationhuemode.c
index b468ca5..6db2f79 100644
--- a/app/operations/gimpoperationhuemode.c
+++ b/app/operations/gimpoperationhuemode.c
@@ -33,7 +33,6 @@
 #include "gimpoperationhuemode.h"
 
 
-static void     gimp_operation_hue_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_hue_mode_process (GeglOperation       *operation,
                                                  void                *in_buf,
                                                  void                *aux_buf,
@@ -62,8 +61,7 @@ gimp_operation_hue_mode_class_init (GimpOperationHueModeClass *klass)
                                  "description", "GIMP hue mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_hue_mode_prepare;
-  point_class->process     = gimp_operation_hue_mode_process;
+  point_class->process = gimp_operation_hue_mode_process;
 }
 
 static void
@@ -71,17 +69,6 @@ gimp_operation_hue_mode_init (GimpOperationHueMode *self)
 {
 }
 
-static void
-gimp_operation_hue_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_hue_mode_process (GeglOperation       *operation,
                                  void                *in_buf,
diff --git a/app/operations/gimpoperationlightenonlymode.c b/app/operations/gimpoperationlightenonlymode.c
index b2cb2f3..1474767 100644
--- a/app/operations/gimpoperationlightenonlymode.c
+++ b/app/operations/gimpoperationlightenonlymode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationlightenonlymode.h"
 
 
-static void     gimp_operation_lighten_only_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_lighten_only_mode_process (GeglOperation       *operation,
                                                           void                *in_buf,
                                                           void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_lighten_only_mode_class_init (GimpOperationLightenOnlyModeClass *
                                  "description", "GIMP lighten only mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_lighten_only_mode_prepare;
-  point_class->process     = gimp_operation_lighten_only_mode_process;
+  point_class->process = gimp_operation_lighten_only_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_lighten_only_mode_init (GimpOperationLightenOnlyMode *self)
 {
 }
 
-static void
-gimp_operation_lighten_only_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_lighten_only_mode_process (GeglOperation       *operation,
                                           void                *in_buf,
diff --git a/app/operations/gimpoperationmultiplymode.c b/app/operations/gimpoperationmultiplymode.c
index 6c126fd..720aec0 100644
--- a/app/operations/gimpoperationmultiplymode.c
+++ b/app/operations/gimpoperationmultiplymode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationmultiplymode.h"
 
 
-static void     gimp_operation_multiply_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_multiply_mode_process (GeglOperation       *operation,
                                                       void                *in_buf,
                                                       void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_multiply_mode_class_init (GimpOperationMultiplyModeClass *klass)
                                  "description", "GIMP multiply mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_multiply_mode_prepare;
-  point_class->process     = gimp_operation_multiply_mode_process;
+  point_class->process = gimp_operation_multiply_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_multiply_mode_init (GimpOperationMultiplyMode *self)
 {
 }
 
-static void
-gimp_operation_multiply_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_multiply_mode_process (GeglOperation       *operation,
                                       void                *in_buf,
diff --git a/app/operations/gimpoperationoverlaymode.c b/app/operations/gimpoperationoverlaymode.c
index 611cf4e..6cd3b7e 100644
--- a/app/operations/gimpoperationoverlaymode.c
+++ b/app/operations/gimpoperationoverlaymode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationoverlaymode.h"
 
 
-static void     gimp_operation_overlay_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_overlay_mode_process (GeglOperation       *operation,
                                                      void                *in_buf,
                                                      void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_overlay_mode_class_init (GimpOperationOverlayModeClass *klass)
                                  "description", "GIMP overlay mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_overlay_mode_prepare;
-  point_class->process     = gimp_operation_overlay_mode_process;
+  point_class->process = gimp_operation_overlay_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_overlay_mode_init (GimpOperationOverlayMode *self)
 {
 }
 
-static void
-gimp_operation_overlay_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_overlay_mode_process (GeglOperation       *operation,
                                      void                *in_buf,
diff --git a/app/operations/gimpoperationreplacemode.c b/app/operations/gimpoperationreplacemode.c
index 6a38896..40f72c9 100644
--- a/app/operations/gimpoperationreplacemode.c
+++ b/app/operations/gimpoperationreplacemode.c
@@ -28,15 +28,14 @@
 #include "gimpoperationreplacemode.h"
 
 
-static void     gimp_operation_replace_mode_prepare      (GeglOperation       *operation);
-static gboolean gimp_operation_replace_mode_process      (GeglOperation       *operation,
-                                                          void                *in_buf,
-                                                          void                *aux_buf,
-                                                          void                *aux2_buf,
-                                                          void                *out_buf,
-                                                          glong                samples,
-                                                          const GeglRectangle *roi,
-                                                          gint                 level);
+static gboolean gimp_operation_replace_mode_process (GeglOperation       *operation,
+                                                     void                *in_buf,
+                                                     void                *aux_buf,
+                                                     void                *aux2_buf,
+                                                     void                *out_buf,
+                                                     glong                samples,
+                                                     const GeglRectangle *roi,
+                                                     gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationReplaceMode, gimp_operation_replace_mode,
@@ -57,8 +56,7 @@ gimp_operation_replace_mode_class_init (GimpOperationReplaceModeClass *klass)
                                  "description", "GIMP replace mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_replace_mode_prepare;
-  point_class->process     = gimp_operation_replace_mode_process;
+  point_class->process = gimp_operation_replace_mode_process;
 }
 
 static void
@@ -66,17 +64,6 @@ gimp_operation_replace_mode_init (GimpOperationReplaceMode *self)
 {
 }
 
-static void
-gimp_operation_replace_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("RGBA float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_replace_mode_process (GeglOperation       *operation,
                                      void                *in_buf,
diff --git a/app/operations/gimpoperationsaturationmode.c b/app/operations/gimpoperationsaturationmode.c
index 369acdc..25287eb 100644
--- a/app/operations/gimpoperationsaturationmode.c
+++ b/app/operations/gimpoperationsaturationmode.c
@@ -33,7 +33,6 @@
 #include "gimpoperationsaturationmode.h"
 
 
-static void     gimp_operation_saturation_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_saturation_mode_process (GeglOperation       *operation,
                                                         void                *in_buf,
                                                         void                *aux_buf,
@@ -62,8 +61,7 @@ gimp_operation_saturation_mode_class_init (GimpOperationSaturationModeClass *kla
                                  "description", "GIMP saturation mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_saturation_mode_prepare;
-  point_class->process     = gimp_operation_saturation_mode_process;
+  point_class->process = gimp_operation_saturation_mode_process;
 }
 
 static void
@@ -71,17 +69,6 @@ gimp_operation_saturation_mode_init (GimpOperationSaturationMode *self)
 {
 }
 
-static void
-gimp_operation_saturation_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_saturation_mode_process (GeglOperation       *operation,
                                         void                *in_buf,
diff --git a/app/operations/gimpoperationscreenmode.c b/app/operations/gimpoperationscreenmode.c
index 54cf8d6..fe876cf 100644
--- a/app/operations/gimpoperationscreenmode.c
+++ b/app/operations/gimpoperationscreenmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationscreenmode.h"
 
 
-static void     gimp_operation_screen_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_screen_mode_process (GeglOperation       *operation,
                                                     void                *in_buf,
                                                     void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_screen_mode_class_init (GimpOperationScreenModeClass *klass)
                                  "description", "GIMP screen mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_screen_mode_prepare;
-  point_class->process     = gimp_operation_screen_mode_process;
+  point_class->process = gimp_operation_screen_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_screen_mode_init (GimpOperationScreenMode *self)
 {
 }
 
-static void
-gimp_operation_screen_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_screen_mode_process (GeglOperation       *operation,
                                     void                *in_buf,
diff --git a/app/operations/gimpoperationsoftlightmode.c b/app/operations/gimpoperationsoftlightmode.c
index b7dc5b7..3b4818d 100644
--- a/app/operations/gimpoperationsoftlightmode.c
+++ b/app/operations/gimpoperationsoftlightmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationsoftlightmode.h"
 
 
-static void     gimp_operation_softlight_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_softlight_mode_process (GeglOperation       *operation,
                                                        void                *in_buf,
                                                        void                *aux_buf,
@@ -76,8 +75,7 @@ gimp_operation_softlight_mode_class_init (GimpOperationSoftlightModeClass *klass
                                  "reference-composition", reference_xml,
                                  NULL);
 
-  operation_class->prepare = gimp_operation_softlight_mode_prepare;
-  point_class->process     = gimp_operation_softlight_mode_process;
+  point_class->process = gimp_operation_softlight_mode_process;
 }
 
 static void
@@ -85,17 +83,6 @@ gimp_operation_softlight_mode_init (GimpOperationSoftlightMode *self)
 {
 }
 
-static void
-gimp_operation_softlight_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_softlight_mode_process (GeglOperation       *operation,
                                        void                *in_buf,
diff --git a/app/operations/gimpoperationsubtractmode.c b/app/operations/gimpoperationsubtractmode.c
index a11e214..7875f79 100644
--- a/app/operations/gimpoperationsubtractmode.c
+++ b/app/operations/gimpoperationsubtractmode.c
@@ -29,7 +29,6 @@
 #include "gimpoperationsubtractmode.h"
 
 
-static void     gimp_operation_subtract_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_subtract_mode_process (GeglOperation       *operation,
                                                       void                *in_buf,
                                                       void                *aux_buf,
@@ -58,8 +57,7 @@ gimp_operation_subtract_mode_class_init (GimpOperationSubtractModeClass *klass)
                                  "description", "GIMP subtract mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_subtract_mode_prepare;
-  point_class->process     = gimp_operation_subtract_mode_process;
+  point_class->process = gimp_operation_subtract_mode_process;
 }
 
 static void
@@ -67,17 +65,6 @@ gimp_operation_subtract_mode_init (GimpOperationSubtractMode *self)
 {
 }
 
-static void
-gimp_operation_subtract_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_subtract_mode_process (GeglOperation       *operation,
                                       void                *in_buf,
diff --git a/app/operations/gimpoperationvaluemode.c b/app/operations/gimpoperationvaluemode.c
index 8d5cb64..3c3232b 100644
--- a/app/operations/gimpoperationvaluemode.c
+++ b/app/operations/gimpoperationvaluemode.c
@@ -33,7 +33,6 @@
 #include "gimpoperationvaluemode.h"
 
 
-static void     gimp_operation_value_mode_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_value_mode_process (GeglOperation       *operation,
                                                    void                *in_buf,
                                                    void                *aux_buf,
@@ -62,8 +61,7 @@ gimp_operation_value_mode_class_init (GimpOperationValueModeClass *klass)
                                  "description", "GIMP value mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_value_mode_prepare;
-  point_class->process     = gimp_operation_value_mode_process;
+  point_class->process = gimp_operation_value_mode_process;
 }
 
 static void
@@ -71,17 +69,6 @@ gimp_operation_value_mode_init (GimpOperationValueMode *self)
 {
 }
 
-static void
-gimp_operation_value_mode_prepare (GeglOperation *operation)
-{
-  const Babl *format = babl_format ("R'G'B'A float");
-
-  gegl_operation_set_format (operation, "input",  format);
-  gegl_operation_set_format (operation, "aux",    format);
-  gegl_operation_set_format (operation, "aux2",   babl_format ("Y float"));
-  gegl_operation_set_format (operation, "output", format);
-}
-
 static gboolean
 gimp_operation_value_mode_process (GeglOperation       *operation,
                                    void                *in_buf,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]