[gimp] app: in gimppaintcore-loops, remove individual-algorithm functions



commit 95761db5574cad38ff3afecd0713da25a5598cec
Author: Ell <ell_se yahoo com>
Date:   Sat Feb 16 08:26:47 2019 -0500

    app: in gimppaintcore-loops, remove individual-algorithm functions
    
    In gimppaintcore-loops, remove the individual-algorithm convenience
    functions, which are merely wrappers around
    gimp_paint_core_loops_process(), and aren't used anywhere anymore.
    This allows us to avoid instanciating certain algorithm-hierarchies
    which aren't used in practice, as will be done by the following
    commits.

 app/paint/gimppaintcore-loops.cc | 133 ---------------------------------------
 app/paint/gimppaintcore-loops.h  |  51 +++------------
 2 files changed, 10 insertions(+), 174 deletions(-)
---
diff --git a/app/paint/gimppaintcore-loops.cc b/app/paint/gimppaintcore-loops.cc
index 5bb1b89511..d4fa6d9fa8 100644
--- a/app/paint/gimppaintcore-loops.cc
+++ b/app/paint/gimppaintcore-loops.cc
@@ -1902,139 +1902,6 @@ gimp_paint_core_loops_process (const GimpPaintCoreLoopsParams *params,
 }
 
 
-/* combine_paint_mask_to_canvas_buffer():
- *
- * A convenience wrapper around 'gimp_paint_core_loops_process()', performing
- * just the COMBINE_PAINT_MASK_TO_CANVAS_BUFFER algorithm.
- */
-
-void
-combine_paint_mask_to_canvas_buffer (const GimpTempBuf *paint_mask,
-                                     gint               mask_x_offset,
-                                     gint               mask_y_offset,
-                                     GeglBuffer        *canvas_buffer,
-                                     gint               x_offset,
-                                     gint               y_offset,
-                                     gfloat             opacity,
-                                     gboolean           stipple)
-{
-  GimpPaintCoreLoopsParams params = {};
-
-  params.canvas_buffer       = canvas_buffer;
-
-  params.paint_buf_offset_x  = x_offset;
-  params.paint_buf_offset_y  = y_offset;
-
-  params.paint_mask          = paint_mask;
-  params.paint_mask_offset_x = mask_x_offset;
-  params.paint_mask_offset_y = mask_y_offset;
-
-  params.stipple             = stipple;
-
-  params.paint_opacity       = opacity;
-
-  gimp_paint_core_loops_process (
-    &params,
-    GIMP_PAINT_CORE_LOOPS_ALGORITHM_COMBINE_PAINT_MASK_TO_CANVAS_BUFFER);
-}
-
-
-/* canvas_buffer_to_paint_buf_alpha():
- *
- * A convenience wrapper around 'gimp_paint_core_loops_process()', performing
- * just the CANVAS_BUFFER_TO_PAINT_BUF_ALPHA algorithm.
- */
-
-void
-canvas_buffer_to_paint_buf_alpha (GimpTempBuf  *paint_buf,
-                                  GeglBuffer   *canvas_buffer,
-                                  gint          x_offset,
-                                  gint          y_offset)
-{
-  GimpPaintCoreLoopsParams params = {};
-
-  params.canvas_buffer      = canvas_buffer;
-
-  params.paint_buf          = paint_buf;
-  params.paint_buf_offset_x = x_offset;
-  params.paint_buf_offset_y = y_offset;
-
-  gimp_paint_core_loops_process (
-    &params,
-    GIMP_PAINT_CORE_LOOPS_ALGORITHM_CANVAS_BUFFER_TO_PAINT_BUF_ALPHA);
-}
-
-
-/* paint_mask_to_paint_buf_alpha():
- *
- * A convenience wrapper around 'gimp_paint_core_loops_process()', performing
- * just the PAINT_MASK_TO_PAINT_BUF_ALPHA algorithm.
- */
-
-void
-paint_mask_to_paint_buf_alpha (const GimpTempBuf  *paint_mask,
-                               gint                mask_x_offset,
-                               gint                mask_y_offset,
-                               GimpTempBuf        *paint_buf,
-                               gfloat              paint_opacity)
-{
-  GimpPaintCoreLoopsParams params = {};
-
-  params.paint_buf           = paint_buf;
-
-  params.paint_mask          = paint_mask;
-  params.paint_mask_offset_x = mask_x_offset;
-  params.paint_mask_offset_y = mask_y_offset;
-
-  params.paint_opacity       = paint_opacity;
-
-  gimp_paint_core_loops_process (
-    &params,
-    GIMP_PAINT_CORE_LOOPS_ALGORITHM_PAINT_MASK_TO_PAINT_BUF_ALPHA);
-}
-
-
-/* do_layer_blend():
- *
- * A convenience wrapper around 'gimp_paint_core_loops_process()', performing
- * just the DO_LAYER_BLEND algorithm.
- */
-
-void
-do_layer_blend (GeglBuffer    *src_buffer,
-                GeglBuffer    *dst_buffer,
-                GimpTempBuf   *paint_buf,
-                GeglBuffer    *mask_buffer,
-                gfloat         opacity,
-                gint           x_offset,
-                gint           y_offset,
-                gint           mask_x_offset,
-                gint           mask_y_offset,
-                GimpLayerMode  paint_mode)
-{
-  GimpPaintCoreLoopsParams params = {};
-
-  params.paint_buf          = paint_buf;
-  params.paint_buf_offset_x = x_offset;
-  params.paint_buf_offset_y = y_offset;
-
-  params.src_buffer         = src_buffer;
-  params.dest_buffer        = dst_buffer;
-
-  params.mask_buffer        = mask_buffer;
-  params.mask_offset_x      = mask_x_offset;
-  params.mask_offset_y      = mask_y_offset;
-
-  params.image_opacity      = opacity;
-
-  params.paint_mode         = paint_mode;
-
-  gimp_paint_core_loops_process (
-    &params,
-    GIMP_PAINT_CORE_LOOPS_ALGORITHM_DO_LAYER_BLEND);
-}
-
-
 /* mask_components_onto():
  *
  * Copies the contents of 'src_buffer' and 'aux_buffer' into 'dst_buffer', over
diff --git a/app/paint/gimppaintcore-loops.h b/app/paint/gimppaintcore-loops.h
index 18354747cf..36974d5e27 100644
--- a/app/paint/gimppaintcore-loops.h
+++ b/app/paint/gimppaintcore-loops.h
@@ -60,47 +60,16 @@ typedef struct
 } GimpPaintCoreLoopsParams;
 
 
-void gimp_paint_core_loops_process       (const GimpPaintCoreLoopsParams *params,
-                                          GimpPaintCoreLoopsAlgorithm     algorithms);
-
-void combine_paint_mask_to_canvas_buffer (const GimpTempBuf              *paint_mask,
-                                          gint                            mask_x_offset,
-                                          gint                            mask_y_offset,
-                                          GeglBuffer                     *canvas_buffer,
-                                          gint                            x_offset,
-                                          gint                            y_offset,
-                                          gfloat                          opacity,
-                                          gboolean                        stipple);
-
-void canvas_buffer_to_paint_buf_alpha    (GimpTempBuf                    *paint_buf,
-                                          GeglBuffer                     *canvas_buffer,
-                                          gint                            x_offset,
-                                          gint                            y_offset);
-
-void paint_mask_to_paint_buf_alpha       (const GimpTempBuf              *paint_mask,
-                                          gint                            mask_x_offset,
-                                          gint                            mask_y_offset,
-                                          GimpTempBuf                    *paint_buf,
-                                          gfloat                          paint_opacity);
-
-void do_layer_blend                      (GeglBuffer                     *src_buffer,
-                                          GeglBuffer                     *dst_buffer,
-                                          GimpTempBuf                    *paint_buf,
-                                          GeglBuffer                     *mask_buffer,
-                                          gfloat                          opacity,
-                                          gint                            x_offset,
-                                          gint                            y_offset,
-                                          gint                            mask_x_offset,
-                                          gint                            mask_y_offset,
-                                          GimpLayerMode                   paint_mode);
-
-void mask_components_onto                (GeglBuffer                     *src_buffer,
-                                          GeglBuffer                     *aux_buffer,
-                                          GeglBuffer                     *dst_buffer,
-                                          const GeglRectangle            *roi,
-                                          GimpComponentMask               mask,
-                                          GimpTRCType                     trc,
-                                          const Babl                     *space);
+void   gimp_paint_core_loops_process (const GimpPaintCoreLoopsParams *params,
+                                      GimpPaintCoreLoopsAlgorithm     algorithms);
+
+void   mask_components_onto          (GeglBuffer                     *src_buffer,
+                                      GeglBuffer                     *aux_buffer,
+                                      GeglBuffer                     *dst_buffer,
+                                      const GeglRectangle            *roi,
+                                      GimpComponentMask               mask,
+                                      GimpTRCType                     trc,
+                                      const Babl                     *space);
 
 
 #endif /* __GIMP_PAINT_CORE_LOOPS_H__ */


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