gegl: pass space on in operation base classes

parent 9cc17e15
......@@ -61,7 +61,9 @@ gegl_operation_area_filter_init (GeglOperationAreaFilter *self)
static void prepare (GeglOperation *operation)
{
const Babl *format = gegl_babl_rgba_linear_float ();
const Babl *format = babl_format_with_space ("RGBA float",
gegl_operation_get_source_space (operation, "input"));
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "output", format);
}
......
......@@ -263,7 +263,13 @@ error:
static void prepare (GeglOperation *operation)
{
const Babl *format = gegl_babl_rgba_linear_float ();
const Babl *space = gegl_operation_get_source_space (operation, "input");
const Babl *format;
if (!space)
space = gegl_operation_get_source_space (operation, "aux");
format = babl_format_with_space ("RGBA float", space);
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
......
......@@ -172,7 +172,15 @@ G_DEFINE_TYPE (GeglOperationPointComposer3, gegl_operation_point_composer3, GEGL
static void prepare (GeglOperation *operation)
{
const Babl *format = gegl_babl_rgba_linear_float ();
const Babl *space = gegl_operation_get_source_space (operation, "input");
const Babl *format;
if (!space)
space = gegl_operation_get_source_space (operation, "aux");
if (!space)
space = gegl_operation_get_source_space (operation, "aux2");
format = babl_format_with_space ("RGBA float", space);
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "aux2", format);
......
......@@ -152,7 +152,9 @@ G_DEFINE_TYPE (GeglOperationPointFilter, gegl_operation_point_filter, GEGL_TYPE_
static void prepare (GeglOperation *operation)
{
const Babl *format = gegl_babl_rgba_linear_float ();
const Babl *space = gegl_operation_get_source_space (operation, "input");
const Babl *format = babl_format_with_space ("RGBA float", space);
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "output", format);
}
......
......@@ -113,7 +113,8 @@ static gboolean gegl_operation_temporal_process (GeglOperation *self,
static void gegl_operation_temporal_prepare (GeglOperation *operation)
{
const Babl *format = babl_format ("RGB u8");
const Babl *space = gegl_operation_get_source_space (operation, "input");
const Babl *format = babl_format_with_space ("RGB u8", space);
gegl_operation_set_format (operation, "output", format);
gegl_operation_set_format (operation, "input", format);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment