Commit d649dcdc authored by Barak Itkin's avatar Barak Itkin
Browse files

Update the operations to match changes in the master branch

parent 3275b05a
......@@ -102,7 +102,7 @@ static inline gfloat
sc_sample_alpha (GeglBuffer *buf, gint x, gint y, const Babl *format)
{
gfloat col[4] = {0, 0, 0, 0};
gegl_buffer_sample (buf, x, y, NULL, col, format, GEGL_SAMPLER_NEAREST);
gegl_buffer_sample (buf, x, y, NULL, col, format, GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
return col[3];
}
......
......@@ -31,8 +31,8 @@ sc_compute_UVT_cache (P2tRTriangulation *mesh,
uvt = gegl_buffer_new (area, SC_BABL_UVT_FORMAT);
iter = gegl_buffer_iterator_new (uvt, area, SC_BABL_UVT_FORMAT,
GEGL_BUFFER_WRITE);
iter = gegl_buffer_iterator_new (uvt, area, 0, SC_BABL_UVT_FORMAT,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
config.step_x = config.step_y = 1;
config.cpp = 4; /* Not that it will be used, but it won't harm */
......@@ -103,9 +103,9 @@ sc_point_to_color_func (P2tRPoint *point,
#undef sc_rect_contains
gegl_buffer_sample (cci->fg_buf, pt->x, pt->y, NULL, aux_c, format, GEGL_SAMPLER_NEAREST);
gegl_buffer_sample (cci->fg_buf, pt->x, pt->y, NULL, aux_c, format, GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
/* Sample the BG with the offset */
gegl_buffer_sample (cci->bg_buf, pt->x + cci->xoff, pt->y + cci->yoff, NULL, input_c, format, GEGL_SAMPLER_NEAREST);
gegl_buffer_sample (cci->bg_buf, pt->x + cci->xoff, pt->y + cci->yoff, NULL, input_c, format, GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
dest_c[0] += weight * (input_c[0] - aux_c[0]);
dest_c[1] += weight * (input_c[1] - aux_c[1]);
......@@ -165,21 +165,25 @@ sc_render_seamless (GeglBuffer *bg,
/* Iterate over the output buffer, while synching with the paste and
* the cache */
iter = gegl_buffer_iterator_new (dest, &to_render, format,
GEGL_BUFFER_WRITE);
iter = gegl_buffer_iterator_new (dest, &to_render, 0, format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
out_index = 0;
uvt_index = gegl_buffer_iterator_add (iter,
cache->uvt,
&to_render,
0,
SC_BABL_UVT_FORMAT,
GEGL_BUFFER_READ);
GEGL_BUFFER_READ,
GEGL_ABYSS_NONE);
fg_index = gegl_buffer_iterator_add (iter,
fg,
&to_render,
0,
format,
GEGL_BUFFER_READ);
GEGL_BUFFER_READ,
GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
......
......@@ -83,9 +83,12 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationSinkClass *sink_class = GEGL_OPERATION_SINK_CLASS (klass);
operation_class->prepare = prepare;
operation_class->name = "gegl:seamless-clone-prepare";
operation_class->categories = "programming";
operation_class->description = _("Seamless cloning preprocessing operation");
gegl_operation_class_set_keys (operation_class,
"name", "gegl:seamless-clone-prepare",
"categories", "programming",
"description", _("Seamless cloning preprocessing operation"),
NULL);
sink_class->process = process;
sink_class->needs_full = TRUE;
......
......@@ -101,11 +101,14 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationComposerClass *composer_class = GEGL_OPERATION_COMPOSER_CLASS (klass);
operation_class->prepare = prepare;
operation_class->name = "gegl:seamless-clone-render";
operation_class->categories = "programming";
operation_class->description = "Seamless cloning rendering operation";
operation_class->get_required_for_output = get_required_for_output;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:seamless-clone-render",
"categories", "programming",
"description", "Seamless cloning rendering operation",
NULL);
composer_class->process = process;
}
......
......@@ -94,12 +94,15 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationComposerClass *composer_class = GEGL_OPERATION_COMPOSER_CLASS (klass);
operation_class->prepare = prepare;
operation_class->name = "gegl:seamless-clone";
operation_class->categories = "blend";
operation_class->description = "Seamless cloning operation";
operation_class->get_required_for_output = get_required_for_output;
composer_class->process = process;
operation_class->opencl_support = FALSE;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:seamless-clone",
"categories", "blend",
"description", "Seamless cloning operation",
NULL);
operation_class->get_required_for_output = get_required_for_output;
}
#endif
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