[gimp] app: remove prepare() impls from erase and anti-erase



commit 268e35a99684cdf05f4a0efccdad331a894b8fff
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jan 19 18:49:22 2017 +0100

    app: remove prepare() impls from erase and anti-erase
    
    the calling code makes sure the ops have the right linear formats.

 .../layer-modes/gimpoperationantierase.c           |   17 ++---------------
 app/operations/layer-modes/gimpoperationerase.c    |   17 ++---------------
 2 files changed, 4 insertions(+), 30 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpoperationantierase.c 
b/app/operations/layer-modes/gimpoperationantierase.c
index b710fec..4340d2a 100644
--- a/app/operations/layer-modes/gimpoperationantierase.c
+++ b/app/operations/layer-modes/gimpoperationantierase.c
@@ -28,7 +28,6 @@
 #include "gimpoperationantierase.h"
 
 
-static void     gimp_operation_anti_erase_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_anti_erase_process (GeglOperation       *operation,
                                                    void                *in_buf,
                                                    void                *aux_buf,
@@ -57,8 +56,7 @@ gimp_operation_anti_erase_class_init (GimpOperationAntiEraseClass *klass)
                                  "description", "GIMP anti erase mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_anti_erase_prepare;
-  point_class->process     = gimp_operation_anti_erase_process;
+  point_class->process = gimp_operation_anti_erase_process;
 }
 
 static void
@@ -66,17 +64,6 @@ gimp_operation_anti_erase_init (GimpOperationAntiErase *self)
 {
 }
 
-static void
-gimp_operation_anti_erase_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_anti_erase_process (GeglOperation       *operation,
                                    void                *in_buf,
@@ -87,7 +74,7 @@ gimp_operation_anti_erase_process (GeglOperation       *operation,
                                    const GeglRectangle *roi,
                                    gint                 level)
 {
-  GimpOperationPointLayerMode *layer_mode = (void*)operation;
+  GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
 
   return gimp_operation_anti_erase_process_pixels (in_buf, aux_buf, aux2_buf,
                                                    out_buf,
diff --git a/app/operations/layer-modes/gimpoperationerase.c b/app/operations/layer-modes/gimpoperationerase.c
index 8f6a51c..2ba62dd 100644
--- a/app/operations/layer-modes/gimpoperationerase.c
+++ b/app/operations/layer-modes/gimpoperationerase.c
@@ -28,7 +28,6 @@
 #include "gimpoperationerase.h"
 
 
-static void     gimp_operation_erase_prepare (GeglOperation       *operation);
 static gboolean gimp_operation_erase_process (GeglOperation       *operation,
                                               void                *in_buf,
                                               void                *aux_buf,
@@ -57,8 +56,7 @@ gimp_operation_erase_class_init (GimpOperationEraseClass *klass)
                                  "description", "GIMP erase mode operation",
                                  NULL);
 
-  operation_class->prepare = gimp_operation_erase_prepare;
-  point_class->process     = gimp_operation_erase_process;
+  point_class->process = gimp_operation_erase_process;
 }
 
 static void
@@ -66,17 +64,6 @@ gimp_operation_erase_init (GimpOperationErase *self)
 {
 }
 
-static void
-gimp_operation_erase_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_erase_process (GeglOperation       *operation,
                               void                *in_buf,
@@ -87,7 +74,7 @@ gimp_operation_erase_process (GeglOperation       *operation,
                               const GeglRectangle *roi,
                               gint                 level)
 {
-  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
 
   return gimp_operation_erase_process_pixels (in_buf, aux_buf, aux2_buf,
                                               out_buf,


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