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.
This commit is contained in:
Ell 2019-02-16 08:26:47 -05:00
parent ee156b8fd6
commit 95761db557
2 changed files with 9 additions and 173 deletions

View file

@ -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

View file

@ -60,47 +60,16 @@ typedef struct
} GimpPaintCoreLoopsParams;
void gimp_paint_core_loops_process (const GimpPaintCoreLoopsParams *params,
GimpPaintCoreLoopsAlgorithm algorithms);
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 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__ */