gimp r25738 - in trunk: . app/base app/config app/core
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25738 - in trunk: . app/base app/config app/core
- Date: Wed, 21 May 2008 19:07:26 +0000 (UTC)
Author: mitch
Date: Wed May 21 19:07:26 2008
New Revision: 25738
URL: http://svn.gnome.org/viewvc/gimp?rev=25738&view=rev
Log:
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().
Modified:
trunk/ChangeLog
trunk/app/base/base-types.h
trunk/app/base/pixel-processor.h
trunk/app/config/gimpbaseconfig.c
trunk/app/core/gimpdrawable-curves.c
trunk/app/core/gimpdrawable-desaturate.c
trunk/app/core/gimpdrawable-invert.c
trunk/app/core/gimpdrawable-levels.c
Modified: trunk/app/base/base-types.h
==============================================================================
--- trunk/app/base/base-types.h (original)
+++ trunk/app/base/base-types.h Wed May 21 19:07:26 2008
@@ -76,9 +76,10 @@
/* functions */
-typedef void (* TileValidateProc) (TileManager *tm,
- Tile *tile,
- gpointer user_data);
+typedef void (* TileValidateProc) (TileManager *tm,
+ Tile *tile,
+ gpointer user_data);
+typedef void (* PixelProcessorFunc) (void);
#endif /* __BASE_TYPES_H__ */
Modified: trunk/app/base/pixel-processor.h
==============================================================================
--- trunk/app/base/pixel-processor.h (original)
+++ trunk/app/base/pixel-processor.h Wed May 21 19:07:26 2008
@@ -25,7 +25,6 @@
#define GIMP_MAX_NUM_THREADS 16
-typedef void (* PixelProcessorFunc) (void);
typedef void (* PixelProcessorProgressFunc) (gpointer progress_data,
gdouble fraction);
Modified: trunk/app/config/gimpbaseconfig.c
==============================================================================
--- trunk/app/config/gimpbaseconfig.c (original)
+++ trunk/app/config/gimpbaseconfig.c Wed May 21 19:07:26 2008
@@ -32,6 +32,7 @@
#include "config-types.h"
+#include "base/base-types.h" /* eek */
#include "base/base-utils.h"
#include "base/pixel-processor.h"
Modified: trunk/app/core/gimpdrawable-curves.c
==============================================================================
--- trunk/app/core/gimpdrawable-curves.c (original)
+++ trunk/app/core/gimpdrawable-curves.c Wed May 21 19:07:26 2008
@@ -24,7 +24,6 @@
#include "base/curves.h"
#include "base/gimplut.h"
-#include "base/pixel-processor.h"
#include "gegl/gimpcurvesconfig.h"
Modified: trunk/app/core/gimpdrawable-desaturate.c
==============================================================================
--- trunk/app/core/gimpdrawable-desaturate.c (original)
+++ trunk/app/core/gimpdrawable-desaturate.c Wed May 21 19:07:26 2008
@@ -23,7 +23,6 @@
#include "core-types.h"
#include "base/desaturate.h"
-#include "base/pixel-processor.h"
#include "gegl/gimpdesaturateconfig.h"
Modified: trunk/app/core/gimpdrawable-invert.c
==============================================================================
--- trunk/app/core/gimpdrawable-invert.c (original)
+++ trunk/app/core/gimpdrawable-invert.c Wed May 21 19:07:26 2008
@@ -24,7 +24,6 @@
#include "base/gimplut.h"
#include "base/lut-funcs.h"
-#include "base/pixel-processor.h"
/* temp */
#include "gimp.h"
Modified: trunk/app/core/gimpdrawable-levels.c
==============================================================================
--- trunk/app/core/gimpdrawable-levels.c (original)
+++ trunk/app/core/gimpdrawable-levels.c Wed May 21 19:07:26 2008
@@ -25,8 +25,6 @@
#include "base/gimphistogram.h"
#include "base/gimplut.h"
#include "base/levels.h"
-#include "base/pixel-processor.h"
-#include "base/pixel-region.h"
#include "gegl/gimplevelsconfig.h"
@@ -38,7 +36,8 @@
#include "gimpdrawable-histogram.h"
#include "gimpdrawable-levels.h"
#include "gimpdrawable-operation.h"
-#include "gimpdrawable-shadow.h"
+#include "gimpdrawable-process.h"
+#include "gimpprogress.h"
#include "gimp-intl.h"
@@ -67,6 +66,7 @@
g_return_if_fail (GIMP_IS_DRAWABLE (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 (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (channel >= GIMP_HISTOGRAM_VALUE &&
channel <= GIMP_HISTOGRAM_ALPHA);
g_return_if_fail (low_input >= 0 && low_input <= 255);
@@ -111,6 +111,7 @@
g_return_if_fail (GIMP_IS_DRAWABLE (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 (progress == NULL || GIMP_IS_PROGRESS (progress));
if (! gimp_drawable_mask_intersect (drawable, NULL, NULL, NULL, NULL))
return;
@@ -157,14 +158,8 @@
}
else
{
- PixelRegion srcPR, destPR;
- Levels levels;
- GimpLut *lut;
- gint x, y;
- gint width, height;
-
- if (! gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
- return;
+ Levels levels;
+ GimpLut *lut;
gimp_levels_config_to_cruft (config, &levels,
gimp_drawable_is_rgb (drawable));
@@ -175,19 +170,9 @@
&levels,
gimp_drawable_bytes (drawable));
- pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
- x, y, width, height, FALSE);
- 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_drawable_process (drawable, progress, _("Levels"),
+ (PixelProcessorFunc) gimp_lut_process, 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]