[gimp] app: remove extract_alpha_region() and its helper functions



commit dd539f199b303ff3f3cc615912896465a9489753
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 19 20:57:22 2012 +0100

    app: remove extract_alpha_region() and its helper functions

 app/paint-funcs/paint-funcs-generic.h |   35 ---------------------------------
 app/paint-funcs/paint-funcs.c         |   29 ---------------------------
 app/paint-funcs/paint-funcs.h         |    6 -----
 3 files changed, 0 insertions(+), 70 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index 8240203..48c16a0 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -213,41 +213,6 @@ shade_pixels (const guchar *src,
 }
 
 
-inline void
-extract_alpha_pixels (const guchar *src,
-                      const guchar *mask,
-                      guchar       *dest,
-                      guint         w,
-                      guint         bytes)
-{
-  const guint alpha = bytes - 1;
-
-  if (mask)
-    {
-      const guchar *m = mask;
-
-      while (w--)
-        {
-          gint tmp;
-
-          *dest++ = INT_MULT(src[alpha], *m, tmp);
-          m++;
-          src += bytes;
-        }
-    }
-  else
-    {
-      while (w--)
-        {
-          gint tmp;
-
-          *dest++ = INT_MULT(src[alpha], OPAQUE_OPACITY, tmp);
-          src += bytes;
-        }
-    }
-}
-
-
 static inline void
 replace_pixels (const guchar   *src1,
                 const guchar   *src2,
diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c
index a67562b..632d3d0 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -1863,35 +1863,6 @@ add_alpha_region (PixelRegion *src,
 
 
 void
-extract_alpha_region (PixelRegion *src,
-                      PixelRegion *mask,
-                      PixelRegion *dest)
-{
-  gpointer pr;
-
-  for (pr = pixel_regions_register (3, src, mask, dest);
-       pr != NULL;
-       pr = pixel_regions_process (pr))
-    {
-      const guchar *m = mask ? mask->data : NULL;
-      const guchar *s = src->data;
-      guchar       *d = dest->data;
-      gint          h = src->h;
-
-      while (h --)
-        {
-          extract_alpha_pixels (s, m, d, src->w, src->bytes);
-
-          s += src->rowstride;
-          d += dest->rowstride;
-          if (mask)
-            m += mask->rowstride;
-        }
-    }
-}
-
-
-void
 extract_from_region (PixelRegion       *src,
                      PixelRegion       *dest,
                      PixelRegion       *mask,
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index 3d81cfb..4d3d573 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -41,12 +41,6 @@ void  shade_pixels          (const guchar *src,
                              guint         bytes,
                              gboolean      has_alpha);
 
-void  extract_alpha_pixels  (const guchar *src,
-                             const guchar *mask,
-                             guchar       *dest,
-                             guint         w,
-                             guint         bytes);
-
 void  swap_pixels           (guchar       *src,
                              guchar       *dest,
                              guint         length);



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