[gegl] gegl:cartoon: use gegl_operation_progress
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl:cartoon: use gegl_operation_progress
- Date: Thu, 21 Apr 2016 19:53:23 +0000 (UTC)
commit 0b9c917dfb7bd145e388f91b7c0b250d49e73fb0
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Apr 21 16:26:22 2016 +0100
gegl:cartoon: use gegl_operation_progress
operations/common/cartoon.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/cartoon.c b/operations/common/cartoon.c
index f680cc0..7bd4efc 100644
--- a/operations/common/cartoon.c
+++ b/operations/common/cartoon.c
@@ -224,6 +224,8 @@ process (GeglOperation *operation,
gdouble ramp;
gint x;
gint y;
+ gfloat tot_pixels = result->width * result->height;
+ gfloat pixels = 0;
grey_blur_buffer (input, o->mask_radius, &dest1, &dest2);
@@ -251,6 +253,7 @@ process (GeglOperation *operation,
gfloat *in_pixel = iter->data[1];
for (y = iter->roi[0].y; y < iter->roi[0].y + iter->roi[0].height; ++y)
+ {
for (x = iter->roi[0].x; x < iter->roi[0].x + iter->roi[0].width; ++x)
{
gfloat pixel1;
@@ -287,7 +290,11 @@ process (GeglOperation *operation,
out_pixel += 4;
in_pixel += 4;
+
}
+ pixels += iter->roi[0].width;
+ gegl_operation_progress (operation, pixels / tot_pixels, "a");
+ }
}
g_object_unref (sampler1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]