2008-02-07 Michael Natterer <mitch@gimp.org>
* app/base/base-utils.[ch]: add get_pid() which returns getpid().
* app/base/base.c
* app/base/tile-swap.c
* app/core/gimp-utils.c
* app/plug-in/gimppluginshm.c
* app/widgets/gimpselectiondata.c
* tools/pdbgen/pdb/misc.pdb: use it instead of getpid() and remove
all the #ifdef'ed includes getpid() needs.
* tools/pdbgen/app.pl: remove support for these includes. Also
remove some perl cruft in the include handling which is not needed
any longer.
* app/pdb/misc_cmds.c: regenerated.
svn path=/trunk/; revision=24827
2008-02-04 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.[ch]: add refcounting and replace free()
API by ref() and unref().
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-levels.c
* app/widgets/gimphistogrameditor.c
* tools/pdbgen/pdb/color.pdb: replace calls to
gimp_histogram_free() by gimp_histogram_unref().
* app/pdb/color_cmds.c: regenerated.
* app/widgets/gimphistogramview.c: reference the histograms so we
don't need the widget's users to keep them around while the widget
exists.
* app/tools/gimpcurvestool.[ch]: remove the histogram from the
tool struct and just create one locally to set it on the histogram
view widget.
Unrelated:
* app/tools/gimplevelstool.[ch]
* app/tools/gimpthresholdtool.[ch]: renamed "hist" members to
"histogram" plus some cleanup.
svn path=/trunk/; revision=24792
2008-01-28 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.c
* plug-ins/common/lcms.c: use G_STRLOC instead of
G_GNUC_FUNCTION (which is now deprecated).
svn path=/trunk/; revision=24727
2008-01-24 Michael Natterer <mitch@gimp.org>
* app/gegl/Makefile.am
* app/gegl/gegl-types.h
* app/gegl/gimpcolorbalanceconfig.[ch]: new config object.
* app/gegl/gimpoperationcolorbalance.[ch]: use it.
* app/tools/gimpcolorbalancetool.[ch]: port to
GimpColorBalanceConfig and use the old ColorBalance cruft only in
map(). The effect of the GEGL operator is now even more different
from the cruft code because I removed a hack that was applying an
additional factor when mapping between the ColorBalance values and
the new properties, but that was only a workaround to make it look
more similar anyway. Will have to fix this properly.
* app/base/color-balance.[ch]: remove API that is now obsolete.
svn path=/trunk/; revision=24701
2008-01-23 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpoperationlevels.[ch]
(gimp_operation_levels_map_input): new utility function which maps
a single value.
* app/tools/gimplevelstool.[ch] (levels_update_adjustments): use the
new function to create the input arrays for gimp_color_bar_set_buffer().
Removed the Levels struct from the GimpLevelsTool struct and only
use it in map() when needed.
* app/base/levels.[ch]: remove obsolete API and struct members.
svn path=/trunk/; revision=24682
2008-01-22 Michael Natterer <mitch@gimp.org>
* app/gegl/Makefile.am
* app/gegl/gegl-types.h
* app/gegl/gimphuesaturationconfig.[ch]: new config object.
* app/gegl/gimpoperationhuesaturation.[ch]: remove all properties
and add a "config" property. Also add API to map a single GimpRGB
needed by the hue-saturation tool's color areas.
* app/tools/gimphuesaturationtool.[ch]: switch to using
GimpHueSaturationConfig, use the old HueSaturation struct only in
map().
* app/base/hue-saturation.[ch]: remove API that's no longer needed.
svn path=/trunk/; revision=24667
2008-01-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-levels.c: port to GEGL and use the new
code path when use-gegl is TRUE.
* app/base/levels.[ch]: remove stretch and pick APIs which are not
used any longer.
svn path=/trunk/; revision=24659
2007-12-29 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.[ch]: add boxed type GIMP_TYPE_TILE_MANAGER.
* app/gegl/gimpoperationtilesink.c
* app/gegl/gimpoperationtilesource.c: use GParamSpecBoxed instead
of GParamSpecPointer for the tile-manager properties and ref them
properly. Some cleanup.
svn path=/trunk/; revision=24465
2007-12-18 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c: use the coordinate parameters in
tile_data_pointer() instead of adjusting the pointer manually.
svn path=/trunk/; revision=24392
2007-12-18 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.[ch]: renamed tile_manager_validate() to
tile_manager_validate_tile(). If no validate_proc is set,
initialize the tile data to all zero when validating it. This way
we never hand out uninitialized data and valgrind doesn't need to
complain any longer.
* app/base/tile.c: changed accordingly.
* app/core/gimpselection.c: no need to set an extra validate_proc
here as the default implementation now does the job for us.
svn path=/trunk/; revision=24389
2007-12-13 Sven Neumann <sven@gimp.org>
* app/base/temp-buf.c (temp_buf_demultiply): corrected formula
for
demultiplying the alpha value.
svn path=/trunk/; revision=24356
2007-12-13 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c (tile_pyramid_write_quarter)
* app/display/gimpdisplayshell-render.c
(render_image_tile_fault_nearest): corrected formula used for
pre-multiplying the alpha value.
svn path=/trunk/; revision=24353
2007-12-13 Sven Neumann <sven@gimp.org>
Speed up our display rendering code paths by keeping data with
pre-multiplied alpha where possible. The projection tile-manager
at 100 % zoom is not affected. So we can still always get the
non-pre-multiplied pixel data.
* app/core/gimpprojection.[ch]: removed
gimp_projection_get_opacity(), the projection is always opaque.
* app/base/tile-pyramid.[ch]: use pre-multiplied alpha for the
upper levels of the pyramid. This speeds up validation of the
upper levels significantly.
* app/base/temp-buf.[ch]: added temp_buf_demultiply().
* app/core/gimpimage-preview.c: demultiply the preview temp-buf
obtained from the projection's tile tyramid.
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-render.c: added code to deal with
pre-multiplied data. In fact all data returned by
render_image_tile_fault() is now pre-multiplied so that
render_image_rgb_a() and render_image_gray_a() don't need to use
the large lookup tables from gimprender.[ch] any longer.
svn path=/trunk/; revision=24352
2007-12-12 Tor Lillqvist <tml@novell.com>
* app/base/tile-private.h
* app/base/tile-swap.c: Move the LARGE_SEEK and LARGE_TRUNCATE
macros from tile-private.h to tile-swap.c as they aren't used
anywhere else, and the helper function used on Windows was static
in tile-swap.c anyway. (#503124)
svn path=/trunk/; revision=24331
2007-12-09 Hans Breuer <hans@breuer.org>
* app/gimp-log.h : an ugly but working variant for no varargs macros
* app/base/base-utils.c(get_physical_memory_size) : fallback to
GetMemoryStatus() for older compiler/sdk
* app/core/gimplayer-floating-sel.c : second argument to g_set_error()
is an uint32, not a pointer
svn path=/trunk/; revision=24306
2007-11-30 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.c (tile_manager_invalidate_area): if no
tiles have been allocated, there's no need to invalidate any.
Should fix bug #500178.
svn path=/trunk/; revision=24244
2007-11-17 Sven Neumann <sven@gimp.org>
* app/base/base-utils.c (get_physical_memory_size): added a cast
to avoid an integer overflow on 32bit machines.
svn path=/trunk/; revision=24182
2007-11-17 Sven Neumann <sven@gimp.org>
* app/base/base-utils.[ch]: changed to
get_physical_memory_size()
and added an implementation for POSIX.2 platforms.
svn path=/trunk/; revision=24180
2007-11-16 Tor Lillqvist <tml@novell.com>
* app/base/base-utils.c
* app/base/base-utils.h (get_physical_memory_size_megabytes): New
function that Sven asked for. Somebody please fill in Unix
implementation(s).
svn path=/trunk/; revision=24175
2007-11-16 Sven Neumann <sven@gimp.org>
* app/base/lut-funcs.c (equalize_lut_setup): make sure we don't
get stuck in a loop if all pixels are transparent (bug #497291).
svn path=/trunk/; revision=24172
2007-11-02 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpcurve-save.[ch]
* app/core/gimpcurve-load.[ch]
* app/core/gimpcurve.[ch]: new GimpData subclass which keeps a
curve as known from the curves tool. Pretty much unfinished, but
can do everything that used to be done by base/curves.c and more.
* app/base/curves.[ch]: stripped down to plain arrays of
uchar (the actual curve) and the LUT setup function. All the rest
is done by GimpCurve now.
* app/tools/gimpcurvestool.[ch]: use an array of GimpCurves
instead of the old Curves cruft. Use Curves only for the last step
of creating the LUT. Pretty much unfinished migration here too.
* tools/pdbgen/pdb/color.pdb: use a GimpCurve here too.
* app/pdb/color_cmds.c: regenerated.
svn path=/trunk/; revision=24041
2007-11-01 Tor Lillqvist <tml@novell.com>
* app/base/base-utils.c
* app/base/base-utils.h: New files, with just one function so far,
get_number_of_processors(). Include implementation also for Win32.
* app/base/Makefile.am (libappbase_a_SOURCES): Add new files.
* app/config/gimpbaseconfig.c (gimp_base_config_class_init): Use
get_number_of_processors().
svn path=/trunk/; revision=24028
2007-10-23 Michael Natterer <mitch@gimp.org>
* app/base/pixel-region.c (pixel_region_resize): when resizing,
don't advance the "data" pointer of regions of contiguous data. I
should have made this change along with my pixel region cleanup of
2005-09-03 which sanitized pixel regions of contiguous data.
Fixes bug #489229.
* libgimp/gimppixelrgn.c (gimp_pixel_rgn_resize): remove the same
code here (the removed code was dead since this function refuses
to be called on pixel regions without a drawable).
svn path=/trunk/; revision=23922
2007-10-09 Sven Neumann <sven@gimp.org>
* app/base/tile.[ch]
* app/paint-funcs/paint-funcs.c: moved code to update tile row
hints to tile.[ch].
svn path=/trunk/; revision=23777
2007-09-07 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.c (read_pixel_data_1): use a temporary
variable to store the return value of tile_manager_get() instead
of assigning to tm->cached_tile directly to make sure
tm->cached_num and tm->cached_tile are always in a consistent
state (the requested tile might be invalid and needs to be
validated, which would call tile_manager_get() recursively, which
in turn would clear the cached tile). Fixes bug #472770.
svn path=/trunk/; revision=23472
2007-08-31 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager.c (tile_manager_get): if
tile_manager->cached_tile is requested for writing, clear the
cache before giving out the tile. Fixes bug #472170.
svn path=/trunk/; revision=23425
2007-08-13 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.c (gimp_histogram_get_std_dev): corrected
caluclation for the histogram in RGB mode (bug #466189).
svn path=/trunk/; revision=23232
2007-07-17 Sven Neumann <sven@gimp.org>
* app/paint-funcs/Makefile.am
* app/paint-funcs/scale-funcs.[ch]
* app/paint-funcs/sample-funcs.[ch]: moved subsample_region() to
new file and also moved subsample_indexed_region() there.
* app/base/tile-manager-preview.c
* app/core/gimpdrawable-preview.c: changed accordingly.
svn path=/trunk/; revision=22953
2007-07-17 Sven Neumann <sven@gimp.org>
* app/base/tile-manager-preview.[ch]: added
tile_manager_get_sub_preview().
* app/core/gimpdrawable-preview.c: use the new function except
for
indexed drawables.
svn path=/trunk/; revision=22950
2007-07-17 Sven Neumann <sven@gimp.org>
* app/base/Makefile.am
* app/base/tile-manager-preview.[ch]: added new file that holds
code
to create a preview from a tile manager.
* app/core/gimpbuffer.c
* app/core/gimpimage-preview.c: use the new function instead of
duplicating this code.
svn path=/trunk/; revision=22948