[gimp/goat-invasion: 79/526] app: remove flatten_region() and its helper functions



commit f0d7167e31c20f263155e32e7191306a45ecaca9
Author: Michael Natterer <mitch gimp org>
Date:   Fri Mar 16 15:18:02 2012 +0100

    app: remove flatten_region() and its helper functions

 app/paint-funcs/paint-funcs-generic.h |   27 ---------------------------
 app/paint-funcs/paint-funcs.c         |   25 -------------------------
 app/paint-funcs/paint-funcs.h         |   10 ----------
 3 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index 8ee5e3a..bc59b02 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -497,33 +497,6 @@ add_alpha_pixels (const guchar *src,
 
 
 inline void
-flatten_pixels (const guchar *src,
-                guchar       *dest,
-                const guchar *bg,
-                guint         length,
-                guint         bytes)
-{
-  const guint alpha = bytes - 1;
-
-  while (length --)
-    {
-      guint b;
-
-      for (b = 0; b < alpha; b++)
-        {
-          gint t1, t2;
-
-          dest[b] = (INT_MULT (src[b], src[alpha], t1) +
-                     INT_MULT (bg[b], (255 - src[alpha]), t2));
-        }
-
-      src += bytes;
-      dest += alpha;
-    }
-}
-
-
-inline void
 gray_to_rgb_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 d34863e..1657198 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -1951,31 +1951,6 @@ add_alpha_region (PixelRegion *src,
 
 
 void
-flatten_region (PixelRegion *src,
-                PixelRegion *dest,
-                guchar      *bg)
-{
-  gpointer pr;
-
-  for (pr = pixel_regions_register (2, src, dest);
-       pr != NULL;
-       pr = pixel_regions_process (pr))
-    {
-      const guchar *s = src->data;
-      guchar       *d = dest->data;
-      gint          h = src->h;
-
-      while (h --)
-        {
-          flatten_pixels (s, d, bg, src->w, src->bytes);
-          s += src->rowstride;
-          d += dest->rowstride;
-        }
-    }
-}
-
-
-void
 extract_alpha_region (PixelRegion *src,
                       PixelRegion *mask,
                       PixelRegion *dest)
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index f0e5571..a365ffb 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -75,12 +75,6 @@ void  add_alpha_pixels      (const guchar *src,
                              guint         length,
                              guint         bytes);
 
-void  flatten_pixels        (const guchar *src,
-                             guchar       *dest,
-                             const guchar *bg,
-                             guint         length,
-                             guint         bytes);
-
 void  gray_to_rgb_pixels    (const guchar *src,
                              guchar       *dest,
                              guint         length,
@@ -355,10 +349,6 @@ void  copy_region                         (PixelRegion *src,
 void  add_alpha_region                    (PixelRegion *src,
                                            PixelRegion *dest);
 
-void  flatten_region                      (PixelRegion *src,
-                                           PixelRegion *dest,
-                                           guchar      *bg);
-
 void  extract_alpha_region                (PixelRegion *src,
                                            PixelRegion *mask,
                                            PixelRegion *dest);



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