Commit a0816441 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/common/iwarp.c plug-ins/ifscompose/ifscompose.c applied patches

2006-02-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/iwarp.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/ifscompose/ifscompose_utils.c: applied patches from
	Stephane Chauveau. Reduces number of progress updates (bug #331470).
parent 3e180680
2006-02-17 Sven Neumann <sven@gimp.org>
* plug-ins/common/iwarp.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/ifscompose/ifscompose_utils.c: applied patches from
Stephane Chauveau. Reduces number of progress updates (bug #331470).
2006-02-17 Sven Neumann <sven@gimp.org>
* app/dialogs/preferences-dialog.c: use a scrolled window as
......
......@@ -663,12 +663,13 @@ iwarp_supersample (gint sxl,
(*progress)++;
}
gimp_progress_update ((gdouble) (*progress) / max_progress);
vh = srow_old;
srow_old = srow;
srow = vh;
}
gimp_progress_update ((gdouble) (*progress) / max_progress);
g_free (srow);
g_free (srow_old);
}
......@@ -742,8 +743,8 @@ iwarp_frame (void)
}
dest_row += dest_rgn.rowstride;
gimp_progress_update ((gdouble) (progress) / max_progress);
}
gimp_progress_update ((gdouble) (progress) / max_progress);
}
else
{
......
......@@ -1296,12 +1296,11 @@ ifs_compose (GimpDrawable *drawable)
gimp_context_get_background (&color);
gimp_rgb_get_uchar (&color, &rc, &gc, &bc);
for (band_no = 0, band_y = 0; band_no < num_bands; band_no++)
{
GimpPixelRgn dest_rgn;
GimpPixelRgn dest_rgn;
gpointer pr;
gint progress;
gint max_progress;
gimp_progress_init_printf (_("Rendering IFS (%d/%d)"),
band_no + 1, num_bands);
......@@ -1320,15 +1319,11 @@ ifs_compose (GimpDrawable *drawable)
/* transfer the image to the drawable */
gimp_progress_init_printf (_("Copying IFS to image (%d/%d)"),
band_no + 1, num_bands);
progress = 0;
max_progress = band_height * width;
gimp_pixel_rgn_init (&dest_rgn, drawable, 0, band_y,
width, band_height, TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (1, &dest_rgn);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
......@@ -1418,9 +1413,6 @@ ifs_compose (GimpDrawable *drawable)
destrow += dest_rgn.rowstride;
}
progress += dest_rgn.w * dest_rgn.h;
gimp_progress_update ((gdouble) progress / (gdouble) max_progress);
}
band_y += band_height;
......
......@@ -885,6 +885,7 @@ ifs_render (AffElement **elements,
guchar *brush = NULL;
gint brush_size = 1;
gdouble brush_offset = 0.0;
gint next_progress = 0 ;
if (preview)
subdivide = 1;
......@@ -939,9 +940,10 @@ ifs_render (AffElement **elements,
/* now run the iteration */
for (i = 0; i < nsteps; i++)
{
if (!preview && !(i % 5000))
if (!preview && (i > next_progress )) {
next_progress = i + nsteps/32 + 100 ;
gimp_progress_update ((gdouble) i / (gdouble) nsteps);
}
p0 = g_random_int ();
k = 0;
......@@ -1045,6 +1047,10 @@ ifs_render (AffElement **elements,
}
}
} /* main iteration */
if (!preview ) {
gimp_progress_update (1.0);
}
g_free (brush);
g_free (prob);
......
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