[gegl/soc-2011-seamless-clone: 23/49] Update the operations to match changes in the master branch
- From: Barak Itkin <barakitkin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2011-seamless-clone: 23/49] Update the operations to match changes in the master branch
- Date: Sat, 29 Sep 2012 20:28:47 +0000 (UTC)
commit a25f44721193c5ae835f37c73255b1e37ca9305f
Author: Barak Itkin <lightningismyname gmail com>
Date: Fri Jun 1 15:34:50 2012 +0300
Update the operations to match changes in the master branch
operations/common/seamless-clone/find-outline.c | 2 +-
.../common/seamless-clone/seamless-clone-common.c | 20 ++++++++++++--------
.../common/seamless-clone/seamless-clone-prepare.c | 9 ++++++---
.../common/seamless-clone/seamless-clone-render.c | 9 ++++++---
operations/common/seamless-clone/seamless-clone.c | 13 ++++++++-----
5 files changed, 33 insertions(+), 20 deletions(-)
---
diff --git a/operations/common/seamless-clone/find-outline.c b/operations/common/seamless-clone/find-outline.c
index ffee91a..dde64f3 100644
--- a/operations/common/seamless-clone/find-outline.c
+++ b/operations/common/seamless-clone/find-outline.c
@@ -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];
}
diff --git a/operations/common/seamless-clone/seamless-clone-common.c b/operations/common/seamless-clone/seamless-clone-common.c
index 886a718..4b9bb83 100644
--- a/operations/common/seamless-clone/seamless-clone-common.c
+++ b/operations/common/seamless-clone/seamless-clone-common.c
@@ -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))
{
diff --git a/operations/common/seamless-clone/seamless-clone-prepare.c b/operations/common/seamless-clone/seamless-clone-prepare.c
index 873ca5e..5b68ab4 100644
--- a/operations/common/seamless-clone/seamless-clone-prepare.c
+++ b/operations/common/seamless-clone/seamless-clone-prepare.c
@@ -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;
diff --git a/operations/common/seamless-clone/seamless-clone-render.c b/operations/common/seamless-clone/seamless-clone-render.c
index 15982fa..1952180 100644
--- a/operations/common/seamless-clone/seamless-clone-render.c
+++ b/operations/common/seamless-clone/seamless-clone-render.c
@@ -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;
}
diff --git a/operations/common/seamless-clone/seamless-clone.c b/operations/common/seamless-clone/seamless-clone.c
index 58e33fe..ed1461b 100644
--- a/operations/common/seamless-clone/seamless-clone.c
+++ b/operations/common/seamless-clone/seamless-clone.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]