gimp r24760 - in trunk: . plug-ins/common



Author: neo
Date: Thu Jan 31 16:00:27 2008
New Revision: 24760
URL: http://svn.gnome.org/viewvc/gimp?rev=24760&view=rev

Log:
2008-01-31  Sven Neumann  <sven gimp org>

	* plug-ins/common/iwarp.c: choose a better tile cache size.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/iwarp.c

Modified: trunk/plug-ins/common/iwarp.c
==============================================================================
--- trunk/plug-ins/common/iwarp.c	(original)
+++ trunk/plug-ins/common/iwarp.c	Thu Jan 31 16:00:27 2008
@@ -301,10 +301,8 @@
         case GIMP_RUN_INTERACTIVE:
         case GIMP_RUN_WITH_LAST_VALS:
           gimp_get_data (PLUG_IN_PROC, &iwarp_vals);
-          gimp_tile_cache_ntiles (2 * (drawable->width + gimp_tile_width ()-1) /
-                                  gimp_tile_width ());
-          if (iwarp_dialog())
-            iwarp();
+          if (iwarp_dialog ())
+            iwarp ();
           gimp_set_data (PLUG_IN_PROC, &iwarp_vals, sizeof (iwarp_vals_t));
           gimp_displays_flush ();
           break;
@@ -683,7 +681,7 @@
   gboolean   padding;
 
   progress = 0;
-  max_progress = (yh-yl)*(xh-xl);
+  max_progress = (yh-yl) * (xh-xl);
 
   gimp_pixel_rgn_init (&dest_rgn, destdrawable,
                        xl, yl, xh-xl, yh-yl, TRUE, TRUE);
@@ -914,7 +912,6 @@
   guchar    *linebuffer = NULL;
   gdouble    dx, dy;
 
-
   dx = (gdouble) sel_width / max_current_preview_width;
   dy = (gdouble) sel_height / max_current_preview_height;
 
@@ -931,7 +928,6 @@
   preview_width  = (gint) (sel_width  / pre2img);
   preview_height = (gint) (sel_height / pre2img);
 
-
   if (srcimage)
     {
       srcimage = g_renew (guchar,
@@ -986,6 +982,8 @@
   tile_width  = gimp_tile_width ();
   tile_height = gimp_tile_height ();
 
+  gimp_tile_cache_ntiles (sel_width / tile_width + 1);
+
   iwarp_preview_init ();
   iwarp_cpy_images ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]