[gegl/soc-2011-seamless-clone: 47/49] Make sure the seamless cloning gets updated on each change
- From: Barak Itkin <barakitkin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2011-seamless-clone: 47/49] Make sure the seamless cloning gets updated on each change
- Date: Sat, 29 Sep 2012 20:30:49 +0000 (UTC)
commit a256d0dc0083a57099198ece9e6312b06fd09065
Author: Barak Itkin <lightningismyname gmail com>
Date: Fri Sep 28 23:09:47 2012 +0200
Make sure the seamless cloning gets updated on each change
operations/common/seamless-clone/seamless-clone.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/seamless-clone/seamless-clone.c b/operations/common/seamless-clone/seamless-clone.c
index bf2864f..10fe3a3 100644
--- a/operations/common/seamless-clone/seamless-clone.c
+++ b/operations/common/seamless-clone/seamless-clone.c
@@ -80,16 +80,19 @@ prepare (GeglOperation *operation)
{
const Babl *format = babl_format (SC_COLOR_BABL_NAME);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ SCProps *props;
- if (o->chant_data == NULL)
+ if ((props = (SCProps*) o->chant_data) == NULL)
{
- SCProps *props = g_slice_new (SCProps);
+ props = g_slice_new (SCProps);
g_mutex_init (&props->mutex);
props->first_processing = TRUE;
props->is_valid = FALSE;
props->context = NULL;
o->chant_data = props;
}
+ props->first_processing = TRUE;
+ props->is_valid = FALSE;
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
@@ -141,7 +144,10 @@ process (GeglOperation *operation,
if (props->first_processing)
{
if (props->context == NULL)
- props->context = sc_context_new (aux, gegl_operation_source_get_bounding_box (operation, "aux"), 0.5, &error);
+ {
+ props->context = sc_context_new (aux, gegl_operation_source_get_bounding_box (operation, "aux"), 0.5, &error);
+ sc_context_set_uvt_cache (props->context, TRUE);
+ }
else
sc_context_update (props->context, aux, gegl_operation_source_get_bounding_box (operation, "aux"), 0.5, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]