[gimp/goat-invasion: 212/526] app: remove swap_region() and its helper function



commit 5734fcf63dd1d6cf8c0bef5366e9c613348d396c
Author: Michael Natterer <mitch gimp org>
Date:   Thu Mar 22 14:29:29 2012 +0100

    app: remove swap_region() and its helper function

 app/paint-funcs/paint-funcs-generic.h |   17 -----------------
 app/paint-funcs/paint-funcs.c         |   25 -------------------------
 app/paint-funcs/paint-funcs.h         |    7 -------
 3 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index 99d9320..7e9a986 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -270,23 +270,6 @@ replace_pixels (const guchar   *src1,
 }
 
 inline void
-swap_pixels (guchar *src,
-             guchar *dest,
-             guint   length)
-{
-  while (length--)
-    {
-      guchar tmp = *dest;
-
-      *dest = *src;
-      *src = tmp;
-
-      src++;
-      dest++;
-    }
-}
-
-inline void
 scale_pixels (const guchar *src,
               guchar       *dest,
               guint         length,
diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c
index 7263f19..c998226 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -3061,31 +3061,6 @@ border_region (PixelRegion *src,
   g_free (density);
 }
 
-void
-swap_region (PixelRegion *src,
-             PixelRegion *dest)
-{
-  gpointer pr;
-
-  for (pr = pixel_regions_register (2, src, dest);
-       pr != NULL;
-       pr = pixel_regions_process (pr))
-    {
-      guchar *s      = src->data;
-      guchar *d      = dest->data;
-      gint    pixels = src->w * src->bytes;
-      gint    h      = src->h;
-
-      while (h--)
-        {
-          swap_pixels (s, d, pixels);
-
-          s += src->rowstride;
-          d += dest->rowstride;
-        }
-    }
-}
-
 
 /* Computes whether pixels in `buf[1]' have neighbouring pixels that are
    unselected. Put result in `transition'. */
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index e8cd5c4..bc5c27d 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -33,10 +33,6 @@ void  blend_pixels          (const guchar *src1,
                              guint         w,
                              guint         bytes);
 
-void  swap_pixels           (guchar       *src,
-                             guchar       *dest,
-                             guint         length);
-
 void  scale_pixels          (const guchar *src,
                              guchar       *dest,
                              guint         length,
@@ -313,9 +309,6 @@ void  smooth_region                       (PixelRegion *region);
 void  erode_region                        (PixelRegion *region);
 void  dilate_region                       (PixelRegion *region);
 
-void  swap_region                         (PixelRegion *src,
-                                           PixelRegion *dest);
-
 
 /*  Apply a mask to an image's alpha channel  */
 void  apply_mask_to_region                (PixelRegion *src,



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