gimp r26790 - in trunk: . app/core app/paint-funcs



Author: neo
Date: Wed Aug 27 10:19:15 2008
New Revision: 26790
URL: http://svn.gnome.org/viewvc/gimp?rev=26790&view=rev

Log:
2008-08-27  Sven Neumann  <sven gimp org>

	* app/core/gimp-transform-region.c: sprinkled more const 
qualifiers.

	* app/paint-funcs/scale-region.c: call the progress callback 
less
	often.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimp-transform-region.c
   trunk/app/paint-funcs/scale-region.c

Modified: trunk/app/core/gimp-transform-region.c
==============================================================================
--- trunk/app/core/gimp-transform-region.c	(original)
+++ trunk/app/core/gimp-transform-region.c	Wed Aug 27 10:19:15 2008
@@ -117,50 +117,50 @@
                                             gdouble           *u,
                                             gdouble           *v);
 
-static inline gboolean supersample_dtest   (gdouble u0,
-                                            gdouble v0,
-                                            gdouble u1,
-                                            gdouble v1,
-                                            gdouble u2,
-                                            gdouble v2,
-                                            gdouble u3,
-                                            gdouble v3);
+static inline gboolean supersample_dtest   (const gdouble u0,
+                                            const gdouble v0,
+                                            const gdouble u1,
+                                            const gdouble v1,
+                                            const gdouble u2,
+                                            const gdouble v2,
+                                            const gdouble u3,
+                                            const gdouble v3);
 
 static void     sample_adapt      (PixelSurround *surround,
-                                   gdouble        uc,
-                                   gdouble        vc,
-                                   gdouble        u0,
-                                   gdouble        v0,
-                                   gdouble        u1,
-                                   gdouble        v1,
-                                   gdouble        u2,
-                                   gdouble        v2,
-                                   gdouble        u3,
-                                   gdouble        v3,
-                                   gint           level,
+                                   const gdouble  uc,
+                                   const gdouble  vc,
+                                   const gdouble  u0,
+                                   const gdouble  v0,
+                                   const gdouble  u1,
+                                   const gdouble  v1,
+                                   const gdouble  u2,
+                                   const gdouble  v2,
+                                   const gdouble  u3,
+                                   const gdouble  v3,
+                                   const  gint    level,
                                    guchar        *color,
-                                   gint           bpp,
-                                   gint           alpha);
+                                   const gint     bpp,
+                                   const gint     alpha);
 
 static void     sample_linear     (PixelSurround *surround,
-                                   gdouble        u,
-                                   gdouble        v,
+                                   const gdouble  u,
+                                   const gdouble  v,
                                    guchar        *color,
-                                   gint           bytes,
-                                   gint           alpha);
+                                   const gint     bytes,
+                                   const gint     alpha);
 static void     sample_cubic      (PixelSurround *surround,
-                                   gdouble        u,
-                                   gdouble        v,
+                                   const gdouble  u,
+                                   const gdouble  v,
                                    guchar        *color,
-                                   gint           bytes,
-                                   gint           alpha);
+                                   const gint     bytes,
+                                   const gint     alpha);
 static void     sample_lanczos    (PixelSurround *surround,
                                    const gfloat  *lanczos,
-                                   gdouble        u,
-                                   gdouble        v,
+                                   const gdouble  u,
+                                   const gdouble  v,
                                    guchar        *color,
-                                   gint           bytes,
-                                   gint           alpha);
+                                   const gint     bytes,
+                                   const gint     alpha);
 
 
 /*  public functions  */

Modified: trunk/app/paint-funcs/scale-region.c
==============================================================================
--- trunk/app/paint-funcs/scale-region.c	(original)
+++ trunk/app/paint-funcs/scale-region.c	Wed Aug 27 10:19:15 2008
@@ -569,7 +569,12 @@
         }
 
       if (progress_callback)
-        progress_callback (0, max_progress, ((*progress)++), progress_data);
+        {
+          (*progress)++;
+
+          if (*progress % 8 == 0)
+            progress_callback (0, max_progress, *progress, progress_data);
+        }
     }
 
   if (kernel_lookup)



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