[gimp/gtk3-port: 434/451] libgimp: remove some more cruft that is not used any longer



commit 392f838bf575990e521206cd3f7de72f6e8bf861
Author: Michael Natterer <mitch gimp org>
Date:   Fri May 11 16:22:42 2018 +0200

    libgimp: remove some more cruft that is not used any longer

 libgimp/gimppixelfetcher.c |   29 -----------------------------
 libgimp/gimppixelfetcher.h |    3 ---
 libgimp/gimptile.c         |   20 +++-----------------
 libgimp/gimptile.h         |    2 --
 4 files changed, 3 insertions(+), 51 deletions(-)
---
diff --git a/libgimp/gimppixelfetcher.c b/libgimp/gimppixelfetcher.c
index 2f45407..9e4ae1e 100644
--- a/libgimp/gimppixelfetcher.c
+++ b/libgimp/gimppixelfetcher.c
@@ -151,35 +151,6 @@ gimp_pixel_fetcher_set_edge_mode (GimpPixelFetcher         *pf,
 }
 
 /**
- * gimp_pixel_fetcher_set_bg_color:
- * @pf:    a pointer to a previously initialized #GimpPixelFetcher.
- * @color: the color to be used as bg color.
- *
- * Change the background color of a previously initialized pixel region.
- **/
-void
-gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf,
-                                 const GimpRGB    *color)
-{
-  g_return_if_fail (pf != NULL);
-  g_return_if_fail (color != NULL);
-
-  switch (pf->img_bpp)
-    {
-    case 2: pf->bg_color[1] = 255;
-    case 1:
-      pf->bg_color[0] = gimp_rgb_luminance_uchar (color);
-      break;
-
-    case 4: pf->bg_color[3] = 255;
-    case 3:
-      gimp_rgb_get_uchar (color,
-                          pf->bg_color, pf->bg_color + 1, pf->bg_color + 2);
-      break;
-    }
-}
-
-/**
  * gimp_pixel_fetcher_get_pixel:
  * @pf:    a pointer to a previously initialized #GimpPixelFetcher.
  * @x:     the x coordinate of the pixel to get.
diff --git a/libgimp/gimppixelfetcher.h b/libgimp/gimppixelfetcher.h
index a8b5a2c..3ff9301 100644
--- a/libgimp/gimppixelfetcher.h
+++ b/libgimp/gimppixelfetcher.h
@@ -56,9 +56,6 @@ void               gimp_pixel_fetcher_destroy   (GimpPixelFetcher *pf);
 GIMP_DEPRECATED
 void   gimp_pixel_fetcher_set_edge_mode (GimpPixelFetcher         *pf,
                                          GimpPixelFetcherEdgeMode  mode);
-GIMP_DEPRECATED
-void   gimp_pixel_fetcher_set_bg_color  (GimpPixelFetcher         *pf,
-                                         const GimpRGB            *color);
 
 GIMP_DEPRECATED
 void   gimp_pixel_fetcher_get_pixel     (GimpPixelFetcher         *pf,
diff --git a/libgimp/gimptile.c b/libgimp/gimptile.c
index 69939a2..326d370 100644
--- a/libgimp/gimptile.c
+++ b/libgimp/gimptile.c
@@ -117,20 +117,6 @@ gimp_tile_flush (GimpTile *tile)
 }
 
 /**
- * gimp_tile_cache_size:
- * @kilobytes: new cache size in kilobytes
- *
- * Sets the size of the tile cache on the plug-in side. The tile cache
- * is used to reduce the number of tiles exchanged between the GIMP core
- * and the plug-in. See also gimp_tile_cache_ntiles().
- **/
-void
-gimp_tile_cache_size (gulong kilobytes)
-{
-  max_cache_size = kilobytes * 1024;
-}
-
-/**
  * gimp_tile_cache_ntiles:
  * @ntiles: number of tiles that should fit into the cache
  *
@@ -147,9 +133,9 @@ gimp_tile_cache_size (gulong kilobytes)
 void
 gimp_tile_cache_ntiles (gulong ntiles)
 {
-  gimp_tile_cache_size ((ntiles *
-                         gimp_tile_width () *
-                         gimp_tile_height () * 4 + 1023) / 1024);
+  max_cache_size = (ntiles *
+                    gimp_tile_width () *
+                    gimp_tile_height () * 4);
 }
 
 void
diff --git a/libgimp/gimptile.h b/libgimp/gimptile.h
index 711d339..7c4d008 100644
--- a/libgimp/gimptile.h
+++ b/libgimp/gimptile.h
@@ -53,8 +53,6 @@ GIMP_DEPRECATED
 void    gimp_tile_flush        (GimpTile  *tile);
 
 GIMP_DEPRECATED
-void    gimp_tile_cache_size   (gulong     kilobytes);
-GIMP_DEPRECATED
 void    gimp_tile_cache_ntiles (gulong     ntiles);
 
 


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