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

the calling code makes sure the ops have the right linear formats.
This commit is contained in:
Michael Natterer
2017-01-19 18:49:22 +01:00
parent 349cff8c16
commit 268e35a996
2 changed files with 4 additions and 30 deletions

View File

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

View File

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