Commit Graph

37 Commits

Author SHA1 Message Date
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 53ececa514 app/composite/gimp-composite.h app/composite/gimp-composite-generic.c
2006-09-28  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite.h
	* app/composite/gimp-composite-generic.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: added lots of const qualifiers,
	moved variables to local scopes.

	* app/base/pixel-processor.c: formatting.
2006-09-27 23:29:05 +00:00
Michael Natterer d15a6191b6 app/paint-funcs/paint-funcs-generic.h implement copy_color() and
2006-05-16  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: implement copy_color() and
	copy_color_pixels() which copy only the color bytes into a dest
	that has one byte less than src. Renamed component_pixels() to
	copy_component_pixels().

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpbrushclipboard.[ch]: new GimpBrush subclass that
	auto-updates its contents from gimp->global_buffer.

	* app/core/gimp.c (gimp_real_initialize): add a clipboard brush to
	the brush factory. Fixes bug #111082.
2006-05-16 13:11:47 +00:00
Sven Neumann b254ab726e app/paint-funcs/paint-funcs-generic.h code cleanup, moved variables into
2006-04-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: code cleanup, moved variables into
	local scopes, added const qualifiers.
2006-04-25 12:19:24 +00:00
Raphael Quinet 7d8998a99c automatically removed trailing whitespace from 3460 lines.
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
2006-01-17 12:43:50 +00:00
Michael Natterer 0e835efb4e app/paint-funcs/paint-funcs-generic.h reverted patch which makes alpha=255
2005-11-09  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: reverted patch which makes
	alpha=255 when turned off because these functions are not only
	used for display projection. Re-opens bug #143315.
	Fixes bug #307213.
2005-11-09 09:55:45 +00:00
Sven Neumann 8c9e9140c0 replaced the binary XOR operations with a naive but faster implementation
2005-09-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (swap_pixels): replaced
	the binary XOR operations with a naive but faster implementation
	using a local variable.
2005-09-27 22:27:26 +00:00
William Skaggs f06d1a66e4 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): change
	variables from unsigned to signed -- fixes problem described
	in comment 17 of bug #163721.
2005-09-06 17:58:55 +00:00
William Skaggs 4ba616a300 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels):
	Change blending algorithm to fix misbehavior of smudge
	tool, should fix bug #163721.
2005-08-24 17:55:52 +00:00
Sven Neumann 90d861bec2 app/paint-funcs/paint-funcs-generic.h fixed signedness warnings.
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c:
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: fixed signedness warnings.
2005-08-06 11:08:43 +00:00
Sven Neumann 4b29677d16 gaussian_blur_region() writes to the pixel data, need to initialize the
2005-07-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_real_feather):
	gaussian_blur_region() writes to the pixel data, need to initialize
	the pixel region with dirty == TRUE;

	* app/paint-funcs/paint-funcs-generic.h: formatting.
2005-07-09 11:48:02 +00:00
Shlomi Fish 886aff77aa app/paint-funcs/paint-funcs.c fix bug #143315. When the visibility of the
* app/paint-funcs/paint-funcs.c
* app/paint-funcs/paint-funcs-generic.h: fix bug #143315. When the
visibility of the Alpha channel is turned off, it should make alpha=255.
2005-03-14 18:55:24 +00:00
Sven Neumann c6cbd6d335 Applied a bunch of AIX portability fixes (bug #148813):
2004-07-30  Sven Neumann  <sven@gimp.org>

	Applied a bunch of AIX portability fixes (bug #148813):

	* configure.in: when testing for Xmu library, link with -lXt -lX11.

	* app/gui/tips-parser.c
	* app/gui/user-install-dialog.c
	* app/tools/tools-enums.h
	* app/widgets/gimpdasheditor.c
	* app/widgets/widgets-enums.h
	* libgimpthumb/gimpthumb-error.h
	* libgimpwidgets/gimpcolorbutton.c
	* plug-ins/common/edge.c: removed trailing commas from enums.

	* plug-ins/common/snoise.c

	* plug-ins/imagemap/imap_cmd_move.c: no C++ style comments.

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: use integers for bit fields.
2004-07-30 00:57:22 +00:00
Sven Neumann 0256a2dcd2 some code cleanup I did while attempting to optimize this code further.
2004-06-14  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (color_pixels): some code
	cleanup I did while attempting to optimize this code further.
2004-06-14 12:18:30 +00:00
Sven Neumann 8ce95ff6d5 app/paint/gimppaintcore.c app/paint-funcs/paint-funcs-generic.h applied a
2004-06-05  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintcore.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: applied a patch from Philip
	Lafleur that changes the way that paint is applied during a paint
	stroke. Fixes bug #124225.
2004-06-05 16:21:41 +00:00
Sven Neumann 44fd2e0add header cleanup, added some const qualifiers, converted tabs to spaces.
2004-04-15  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]:
	* app/paint-funcs/paint-funcs-generic.h: header cleanup, added
	some const qualifiers, converted tabs to spaces. Fixes bug #140115
	for the HEAD branch.
2004-04-15 12:38:54 +00:00
Manish Singh 0f338c4c2f app/composite/gimp-composite-generic.c
2004-01-27  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-generic.c
        (gimp_composite_overlay_any_any_any_generic)
        * app/paint-funcs/paint-funcs-generic.h (overlay_pixels): use more
        than one temporary when stacking INT_MULTs, to avoid undefined
        values.
2004-01-28 03:58:52 +00:00
Dave Neary fb471dabe0 app/base/color-balance.c app/base/hue-saturation.c
2003-10-16  Dave Neary  <bolsh@gimp.org>

        * app/base/color-balance.c
        * app/base/hue-saturation.c
        * app/composite/gimp-composite-generic.c
        * app/paint-funcs/paint-funcs-generic.h
        * app/tools/gimphuesaturationtool.c
        * libgimpcolor/gimpcolorspace.[ch]: Changed all occurrences of
        gimp_rgb_to_hls_int and gimp_hls_to_rgb_int to
        gimp_rgb_to_hsl_int and gimp_hsl_to_rgb_int respectively. This
        closes bug #124661.
2003-10-16 19:17:08 +00:00
Michael Natterer ab34b3ee94 added new functions color_region_mask() which works like color_region()
2003-09-27  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added new functions
	color_region_mask() which works like color_region() but takes an
	additional maskPR parameters and pattern_region() which fills
	destPR with a TempBuf of *matching color depth*.

	* app/paint-funcs/paint-funcs-generic.h: added corresponding
	color_pixels_mask() and pattern_pixels().

	* app/core/gimpimage.[ch] (gimp_image_transform_temp_buf): new
	function which transforms a TempBuf to a specified drawable's
	color space.

	* app/core/gimpdrawable-bucket-fill.c: the functions were factored
	out here. Removed them and use the new stuff.

	* app/core/core-enums.[ch]: added enum GimpStrokeStyle which can
	be one of { SOLID, PATTERN }.

	* app/core/gimpstrokeoptions.[ch]: added "GimpStrokeStyle style"
	property, cleanup.

	* app/core/gimpdrawable-stroke.c: honor the new "style" property
	and call the new color_region_mask() and pattern_region()
	functions accordingly, cleanup.

	* app/widgets/gimpstrokeeditor.c: added a GUI for the stroke
	style. Ugly but works.

	* app/gui/stroke-dialog.c: undefine "foreground" and "pattern" and
	set the user context as parent context so we get these properties
	from the global settings.
2003-09-27 20:04:07 +00:00
Sven Neumann 555038debf app/composite/gimp-composite-generic.c app/composite/gimp-composite-mmx.c
2003-09-16  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-generic.c
	* app/composite/gimp-composite-mmx.c
	* app/composite/gimp-composite-sse.c
	* app/composite/gimp-composite-sse2.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-serialize.c
	* app/core/cpercep.c
	* app/core/gimpunit.c
	* app/gui/palette-import-dialog.c
	* app/gui/plug-in-menus.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c
	* app/pdb/procedural_db.c
	* app/text/gimptextlayout-render.c
	* app/tools/gimpfuzzyselecttool.c
	* app/widgets/gimpcursor.c: some trivial code cleanups: avoid
	casts that discard const qualifiers and avoid useless comparisons
	on unsigned variables. Also reordered qualifiers in function
	declarations (static comes before const).
2003-09-16 13:12:50 +00:00
Sven Neumann b2c141e822 fix for bug #121305 2003-09-03 16:29:18 +00:00
Sven Neumann 28d130a533 removed some debugging output that I accidentally committed a while ago.
2003-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (blend_pixels): removed
	some debugging output that I accidentally committed a while ago.
	Fixes bug #120576 (slowness of smudge on alpha layers).
2003-08-24 10:57:44 +00:00
Sven Neumann 7c32d439fb fix for Solaris /bin/sh (bug #118002).
2003-07-21  Sven Neumann  <sven@gimp.org>

	* autogen.sh: fix for Solaris /bin/sh (bug #118002).

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: the Forte compiler doesn't
	like the use of global variables in inline functions. Applied a
	patch from Damien Carbery that fixes this (bug #118002).
2003-07-21 16:47:52 +00:00
Sven Neumann 3974e5ee8f Attempt to finally fix Smudge tool problems (bug #115057):
2003-06-13  Sven Neumann  <sven@gimp.org>

        Attempt to finally fix Smudge tool problems (bug #115057):

	* app/paint-funcs/paint-funcs-generic.h (blend_pixels): added an
	implementation for the non-alpha case.

	* app/paint/gimpsmudge.c (gimp_smudge_start): added back code that
	used to prefill the buffer if the inital area was clipped.
2003-06-13 11:12:04 +00:00
Sven Neumann f9fec0cda7 fixed my latest fix. Fixes bug #114882.
2003-06-11  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (blend_pixels): fixed my
	latest fix. Fixes bug #114882.
2003-06-11 00:46:59 +00:00
Sven Neumann 32bab29f18 weight pixels by their alpha value. Fixes the smudge tool (bug #72879).
2003-06-09  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (blend_pixels): weight
	pixels by their alpha value. Fixes the smudge tool (bug #72879).
2003-06-09 15:05:57 +00:00
Michael Natterer 1871d9ccef Implemented DISSOLVE_MODE the way it should have always been. Fixes bug
2003-06-02  Michael Natterer  <mitch@gimp.org>

	Implemented DISSOLVE_MODE the way it should have always been.
	Fixes bug #107402.

	* app/paint-funcs-generic.h (struct apply_layer_mode_struct): added
	"guchar *mask" so it can be used by the layer mode.

	(dissolve_pixels): take an additional "mask" parameter and
	dissolve the pixels according to the *combined* opacity of the
	pixel's alpha, the opacity and the mask. Removed a wrong comment
	about why we call g_rand_int() x times before we start to use its
	values.

	(layer_dissolve_mode): pass the mask to dissolve_pixels(). No need
	to call add_alpha_pixels() since we overwrite the dest buffer
	entirely in disolve_pixels().

	* app/paint-funcs.c (initial_sub_region, combine_sub_region):
	allocate the buffer large enough for DISSOLVE (which always needs
	an alpha channel). Pass the mask to the layer mode functions.
	Discard opacity and mask after applying DISSOLVE since it
	"consumes" all transparency.
2003-06-02 14:21:01 +00:00
Sven Neumann 254cfb27ad fixed typo: use x1 instead of the uninitialized variable x.
2003-05-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): fixed typo: use x1 instead
	of the uninitialized variable x.

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: removed unused variable
	has_alpha from blend_pixels() function.

	* app/base/temp-buf.c: cosmetics.
2003-05-15 21:01:02 +00:00
Sven Neumann 3c30a90bdb added gimp_channel_new_from_component() which creates a new GimpChannel
2003-03-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.[ch]: added gimp_channel_new_from_component()
	which creates a new GimpChannel from an image's color component.

	* app/gui/channels-commands.[ch]: added
	channels_duplicate_component_cmd_callback().

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: added code to extract a color
	component from a PixelRegion (untested!).

	* plug-ins/common/checkerboard.c: cosmetics.
2003-03-11 23:54:49 +00:00
Dave Neary cd28dee822 configure.in app/core/gimpbrushpipe.c app/gui/about-dialog.c
2002-11-20  Dave Neary  <bolsh@gimp.org>

        * configure.in
        * app/core/gimpbrushpipe.c
        * app/gui/about-dialog.c
        * app/paint-funcs/paint-funcs-generic.h
        * app/paint-funcs/paint-funcs.c
        * libgimpmath/gimpmath.h
        * libgimpwidgets/gimpwidgets.c
        * plug-ins/common/CML_explorer.c
        * plug-ins/common/blur.c
        * plug-ins/common/cubism.c
        * plug-ins/common/gee.c
        * plug-ins/common/gee_zoom.c
        * plug-ins/common/gqbist.c
        * plug-ins/common/jigsaw.c
        * plug-ins/common/lic.c
        * plug-ins/common/noisify.c
        * plug-ins/common/nova.c
        * plug-ins/common/papertile.c
        * plug-ins/common/plasma.c
        * plug-ins/common/randomize.c
        * plug-ins/common/sample_colorize.c
        * plug-ins/common/scatter_hsv.c
        * plug-ins/common/shift.c
        * plug-ins/common/sinus.c
        * plug-ins/common/smooth_palette.c
        * plug-ins/common/snoise.c
        * plug-ins/common/sparkle.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/spread.c
        * plug-ins/common/warp.c
        * plug-ins/common/wind.c
        * plug-ins/flame/cmap.c
        * plug-ins/flame/flame.c
        * plug-ins/flame/libifs.c
        * plug-ins/gflare/gflare.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/gimpressionist/gimpressionist.h
        * plug-ins/gimpressionist/plasma.c
        * plug-ins/gimpressionist/repaint.c
        * plug-ins/ifscompose/ifscompose_utils.c
        * plug-ins/maze/algorithms.c
        * plug-ins/maze/maze.c
        * plug-ins/maze/maze.h
        * plug-ins/mosaic/mosaic.c: Change all occurrences of RAND_MAX,
        G_MAXRAND, rand(), srand(), lrand48(), srand48(), random(),
        srandom(), RAND_FUNC and SRAND_FUNC to the appropriate g_rand*
        equivalent. Programs which require seed setting for reproducible
        results, and anything in the core, gets a dedicated GRand * for
        the lifetime required. Programs which only ever used random
        numbers for tossing a coin, rolling a dice, etc use g_random
        functions. For the rest, judgement was used. Where it was easy, a
        GRand * object was used and g_rand_* functions were
        preferred. This fixes bug #67386 in HEAD.
2002-11-20 09:27:48 +00:00
Sven Neumann ace7acd3b4 app/base/base-enums.h app/paint-funcs/paint-funcs-generic.h
2002-11-05  Sven Neumann  <sven@gimp.org>

	* app/base/base-enums.h
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpwidgets-constructors.c: applied a patch from
	Guillermo S. Romero that adds three new layer modes (Softlight,
	Grain Extract and Grain Merge, #97686).

	* app/base/base-enums.c
	* app/pdb/brush_select_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/misc_tools_cmds.c
	* app/widgets/gimpwidgets-constructors.c
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
2002-11-05 19:33:59 +00:00
Daniel Egger 1ed9180112 Convert ugly comments into named structure fields. Much cleaner and less
2001-12-02  Daniel Egger  <degger@fhm.edu>

	* app/gimprc.c: Convert ugly comments into named structure fields.
	Much cleaner and less errorprone though may cause troubles on
	older compilers and then needs to be reverted. Please report!

	* app/base/base-types.h: Add FIXME reminder.

	* app/base/gimplut.c: Use CLAMP macro instead of if-cascade.

	* app/base/temp-buf.c: Remove duplicated calculations and simplify
	checks.

	* app/base/tile-manager.c:
	- (tile_manager_get_tile_num): Return success and take an additional
	  pointer for the tilenumber.
	- Simplify logic in the rest of the file as a result.
	- Remove rotten debugging cruft.

	* app/core/gimpbrushgenerated.c: Fix two stylistic nits.

	* app/app_procs.c: Include <stdlib.h> for exit () prototype.

	* app/core/gimpdrawable-blend.c: Include <stdlib.h> for abs ()
	prototype.

	* app/display/gimpdisplay.c: Include <string.h> for memcpy ()
	prototype.

	* app/core/gimpimage-convert.c: (HIST_RGB): First parameter is
	not const. Fixes a gcc warning for a wrong return value.

	* libgimpwidgets/gimpunitmenu.c
	* app/core/gimpunit.c: Add suggested (by gcc 3.1 cvs) parentheses
	to group correct logic tests together.

	* app/paint-funcs/paint-funcs-generic.h: Fix my HAS_ALPHA macro
	to avoid gcc 3.1 cvs warning.

	* app/gimprc.h
	* pathP.h
	* base-config.h
	* app/base/boundary.h
	* app/base/gimplut.[ch]
	* app/base/pixel-region.h
	* app/base/pixel-surround.[ch]
	* app/base/temp-buf.[ch]
	* app/base/tile-manager-private.h
	* app/base/tile-manager.c
	* app/base/tile-private.h
	* app/base/tile.[ch]
	* app/core/gimp.h
	* app/core/gimpbrushgenerated.h
	* app/core/gimpbrushpipe.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpcontainer.h
	* app/core/gimpcoreconfig.h
	* app/core/gimpdata.h
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.h
	* app/core/gimpimagefile.h
	* app/core/gimplayer.h
	* app/core/gimplayermask.h
	* app/core/gimpmoduleinfo.h
	* app/core/gimppalette.h
	* app/core/gimpundo.h
	* app/display/gimpdisplay.h
	* app/display/gimpdisplayshell-selection.h
	* app/display/gimpdisplayshell.h
	* app/gui/brush-select.h
	* app/gui/gradient-editor.h
	* app/gui/gradient-select.h
	* app/gui/info-dialog.h
	* app/gui/resize-dialog.h
	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpcolorbalancetool.h
	* app/tools/gimpcolorpickertool.h
	* app/tools/gimpcurvestool.h
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpfreeselecttool.h
	* app/tools/gimpfuzzyselecttool.h
	* app/tools/gimphuesaturationtool.h
	* app/tools/gimpinktool-blob.h
	* app/tools/gimpinktool.h
	* app/tools/gimpiscissorstool.h
	* app/tools/gimpmagnifytool.h
	* app/tools/gimpmeasuretool.h
	* app/tools/gimppainttool.h
	* app/tools/gimppathtool.h
	* app/tools/gimprectselecttool.h
	* app/tools/gimpthresholdtool.h
	* app/tools/gimptool.h
	* app/tools/gimptransformtool.h
	* app/tools/path_toolP.h
	* app/widgets/gimpbrushfactoryview.h
	* app/widgets/gimpconstrainedhwrapbox.h
	* app/widgets/gimpcontainermenu.h
	* app/widgets/gimpcontainerview.h
	* app/widgets/gimpdialogfactory.h
	* app/widgets/gimpimagedock.h
	* app/widgets/gimplistitem.h
	* app/widgets/gimpmenuitem.h
	* app/widgets/gimpnavigationpreview.h
	* app/widgets/gimppreview.h: Unsignify lots of variables and
	parameters and use bitfields in structs where possible. First
	part of a huge cleanup all over the code...
2001-12-02 14:59:30 +00:00
Daniel Egger 7933764758 app/paint-funcs/paint-funcs-generic.h app/paint-funcs/paint-funcs.c
2001-11-27  Daniel Egger  <degger@fhm.edu>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c
	* app/paint-funcs/paint-funcs.h: Unsignified lots of arguments
	and misc cleanups.
2001-11-27 22:40:58 +00:00
Simon Budig 8533a2d3af app/base/base-types.h app/paint-funcs/paint-funcs-generic.h
2001-11-24  Simon Budig  <simon@gimp.org>

        * app/base/base-types.h
        * app/paint-funcs/paint-funcs-generic.h
        * app/paint-funcs/paint-funcs.c
        * app/paint-funcs/paint-funcs.h
        * app/widgets/gimpwidgets-constructors.c:

        implemented "Color Erase" paint mode, the hack in the
        eraser tool will be removed.

        * app/pdb/brush_select_cmds.c
        * app/pdb/brushes_cmds.c
        * app/pdb/layer_cmds.c
        * app/pdb/tools_cmds.c
        * libgimp/gimpenums.h
        * plug-ins/script-fu/script-fu-constants.c
        * tools/pdbgen/enums.pl: regenerated
2001-11-24 19:58:46 +00:00
Daniel Egger 70cec44587 app/paint-funcs/paint-funcs.c app/paint-funcs/paint-funcs-generic.h
2001-11-19  Daniel Egger  <degger@fhm.edu>

	* app/paint-funcs/paint-funcs.c
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.h:
	- Statified a few functions so they can be inlined.
	- Simplified function calls.
	- Unsignified variables and parameters where possible.
	- Reduced lookuptable size for add_pixels from 256*256*4 bytes
	  to 2*256-1 bytes and O(n*n) function in paint_funcs_setup
	  to O(n). Should reduce memory consumption by almost 1/4 Mb.

	This needs much more cleanup....
2001-11-19 17:21:03 +00:00
Daniel Egger 0a28fa8c9c New file. Added glue code for the assembly MMX functions.
2001-11-19  Daniel Egger  <degger@fhm.edu>

	* app/paint-funcs/paint-funcs-mmx.h: New file. Added glue code
	for the assembly MMX functions.

	* app/paint-funcs/paint-funcs-generic.h: Moved MMX code from here ...
	* app/paint-funcs/paint-funcs-mmx.h: ... to here. Cleaned up a bit
	and don't check for use_mmx on every single call but ...
	* app/paint-funcs/paint-funcs.c: (paint_funcs_setup): ... here and
	register MMX functions if CPU has those capabilities.

	Code is untested for the MMX case due no available Intel-Machine
	right now but should't be to far away from a working state.
2001-11-19 13:46:10 +00:00
Daniel Egger 16bbbaec07 app/paint-funcs/paint-funcs.c Split generic (read: C) code for
2001-11-19  Daniel Egger  <degger@fhm.edu>

	* app/paint-funcs/paint-funcs.c
	* app/paint-funcs/paint-funcs-generic.h: Split generic (read: C)
	code for pixelmanipulation and most of the code that belongs to it
	into new file.
	(apply_layer_funcs): Gone. The correct layer function is now
	dispatched from the layer_mode_funcs table and the table is
	per default initialised with the generic functions. Arguments
	will be passed by a struct apply_layer_mode_struct instead
	of directly per stack to avoid parameter typying madness.

	It's now cleanly possible to check for availabilty of
	MMX/AltiVec/(insert your favourite brew here) in
	paint_funcs_setup () and change the table to use faster routines.
	The old MMX cruft which is temporaribly in paint-funcs-generic.h
	will soon be gone but I'm to tired now.

	* app/paint-funcs/paint-funcs.c: Braind dead code for temporary
	buffer (which never shrunk only grew) gone and replaced by
	straightforward code.

	* app/paint-funcs/paint-funcs-generic.h: Applied a bunch of obvious
	optimisations to reduce code size and avoid parameter madness.

	* paint-funcs-[gray|graya|indexed|rga|rgba].[c|h]: Gone. I lost
	several days of work on these files and came to the conclusion
	that there has to be an easier way anyway. :)

	Everything well tested on PPC and producing exactly the same results
	as the code before so this has good odds to be the first major
	change that won't break GIMP. :)
2001-11-19 03:06:09 +00:00