remove PixelProcessorFunc typedef.

2008-05-21  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-processor.h: remove PixelProcessorFunc typedef.

	* app/base/base-types.h: add it here.

	* app/config/gimpbaseconfig.c: #include "base/base-types.h"

	* app/core/gimpdrawable-curves.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: remove pixel processor include.

	* app/core/gimpdrawable-levels.c: port to gimp_drawable_process().


svn path=/trunk/; revision=25738
This commit is contained in:
Michael Natterer
2008-05-21 19:07:26 +00:00
committed by Michael Natterer
parent 7add4e3247
commit 2a064f55a6
8 changed files with 27 additions and 30 deletions

View File

@ -1,3 +1,17 @@
2008-05-21 Michael Natterer <mitch@gimp.org>
* app/base/pixel-processor.h: remove PixelProcessorFunc typedef.
* app/base/base-types.h: add it here.
* app/config/gimpbaseconfig.c: #include "base/base-types.h"
* app/core/gimpdrawable-curves.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-invert.c: remove pixel processor include.
* app/core/gimpdrawable-levels.c: port to gimp_drawable_process().
2008-05-21 Michael Natterer <mitch@gimp.org> 2008-05-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-process.c (gimp_drawable_process): add * app/core/gimpdrawable-process.c (gimp_drawable_process): add

View File

@ -76,9 +76,10 @@ typedef struct _TilePyramid TilePyramid;
/* functions */ /* functions */
typedef void (* TileValidateProc) (TileManager *tm, typedef void (* TileValidateProc) (TileManager *tm,
Tile *tile, Tile *tile,
gpointer user_data); gpointer user_data);
typedef void (* PixelProcessorFunc) (void);
#endif /* __BASE_TYPES_H__ */ #endif /* __BASE_TYPES_H__ */

View File

@ -25,7 +25,6 @@
#define GIMP_MAX_NUM_THREADS 16 #define GIMP_MAX_NUM_THREADS 16
typedef void (* PixelProcessorFunc) (void);
typedef void (* PixelProcessorProgressFunc) (gpointer progress_data, typedef void (* PixelProcessorProgressFunc) (gpointer progress_data,
gdouble fraction); gdouble fraction);

View File

@ -32,6 +32,7 @@
#include "config-types.h" #include "config-types.h"
#include "base/base-types.h" /* eek */
#include "base/base-utils.h" #include "base/base-utils.h"
#include "base/pixel-processor.h" #include "base/pixel-processor.h"

View File

@ -24,7 +24,6 @@
#include "base/curves.h" #include "base/curves.h"
#include "base/gimplut.h" #include "base/gimplut.h"
#include "base/pixel-processor.h"
#include "gegl/gimpcurvesconfig.h" #include "gegl/gimpcurvesconfig.h"

View File

@ -23,7 +23,6 @@
#include "core-types.h" #include "core-types.h"
#include "base/desaturate.h" #include "base/desaturate.h"
#include "base/pixel-processor.h"
#include "gegl/gimpdesaturateconfig.h" #include "gegl/gimpdesaturateconfig.h"

View File

@ -24,7 +24,6 @@
#include "base/gimplut.h" #include "base/gimplut.h"
#include "base/lut-funcs.h" #include "base/lut-funcs.h"
#include "base/pixel-processor.h"
/* temp */ /* temp */
#include "gimp.h" #include "gimp.h"

View File

@ -25,8 +25,6 @@
#include "base/gimphistogram.h" #include "base/gimphistogram.h"
#include "base/gimplut.h" #include "base/gimplut.h"
#include "base/levels.h" #include "base/levels.h"
#include "base/pixel-processor.h"
#include "base/pixel-region.h"
#include "gegl/gimplevelsconfig.h" #include "gegl/gimplevelsconfig.h"
@ -38,7 +36,8 @@
#include "gimpdrawable-histogram.h" #include "gimpdrawable-histogram.h"
#include "gimpdrawable-levels.h" #include "gimpdrawable-levels.h"
#include "gimpdrawable-operation.h" #include "gimpdrawable-operation.h"
#include "gimpdrawable-shadow.h" #include "gimpdrawable-process.h"
#include "gimpprogress.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -67,6 +66,7 @@ gimp_drawable_levels (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (! gimp_drawable_is_indexed (drawable)); g_return_if_fail (! gimp_drawable_is_indexed (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (channel >= GIMP_HISTOGRAM_VALUE && g_return_if_fail (channel >= GIMP_HISTOGRAM_VALUE &&
channel <= GIMP_HISTOGRAM_ALPHA); channel <= GIMP_HISTOGRAM_ALPHA);
g_return_if_fail (low_input >= 0 && low_input <= 255); g_return_if_fail (low_input >= 0 && low_input <= 255);
@ -111,6 +111,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (! gimp_drawable_is_indexed (drawable)); g_return_if_fail (! gimp_drawable_is_indexed (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (! gimp_drawable_mask_intersect (drawable, NULL, NULL, NULL, NULL)) if (! gimp_drawable_mask_intersect (drawable, NULL, NULL, NULL, NULL))
return; return;
@ -157,14 +158,8 @@ gimp_drawable_levels_internal (GimpDrawable *drawable,
} }
else else
{ {
PixelRegion srcPR, destPR; Levels levels;
Levels levels; GimpLut *lut;
GimpLut *lut;
gint x, y;
gint width, height;
if (! gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
return;
gimp_levels_config_to_cruft (config, &levels, gimp_levels_config_to_cruft (config, &levels,
gimp_drawable_is_rgb (drawable)); gimp_drawable_is_rgb (drawable));
@ -175,19 +170,9 @@ gimp_drawable_levels_internal (GimpDrawable *drawable,
&levels, &levels,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable), gimp_drawable_process (drawable, progress, _("Levels"),
x, y, width, height, FALSE); (PixelProcessorFunc) gimp_lut_process, lut);
pixel_region_init (&destPR, gimp_drawable_get_shadow_tiles (drawable),
x, y, width, height, TRUE);
pixel_regions_process_parallel ((PixelProcessorFunc) gimp_lut_process,
lut, 2, &srcPR, &destPR);
gimp_lut_free (lut); gimp_lut_free (lut);
gimp_drawable_merge_shadow_tiles (drawable, TRUE, _("Levels"));
gimp_drawable_free_shadow_tiles (drawable);
gimp_drawable_update (drawable, x, y, width, height);
} }
} }