Commit graph

680 commits

Author SHA1 Message Date
Sven Neumann e2a4316f10 formatting
svn path=/trunk/; revision=23783
2007-10-09 17:20:53 +00:00
Sven Neumann 30e5f7063b app/base/Makefile.am app/base/tile.[ch] moved tile row hints code to its
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/tile.[ch]
	* app/base/tile-rowhints.[ch]: moved tile row hints code to its
	own file.
	
	* app/base/tile-cache.c
	* app/base/tile-manager.c
	* app/base/tile-swap.c
	* app/paint-funcs/paint-funcs.c: changed accordingly.

svn path=/trunk/; revision=23781
2007-10-09 16:14:10 +00:00
Sven Neumann 161ed9623f optimized the rendering of fully opaque regions.
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.c (tile_pyramid_write_quarter): optimized
	the rendering of fully opaque regions.

svn path=/trunk/; revision=23778
2007-10-09 15:46:44 +00:00
Sven Neumann 7aa728b0e0 app/base/tile.[ch] moved code to update tile row hints to tile.[ch].
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-10-09 15:28:55 +00:00
Sven Neumann 05afe3edc1 weight pixels by their alpha value (bug #477689).
2007-09-19  Sven Neumann  <sven@gimp.org>

	* app/base/gimphistogram.c: weight pixels by their alpha value
	(bug #477689).


svn path=/trunk/; revision=23591
2007-09-19 17:21:41 +00:00
Sven Neumann ff80ac1701 formatting.
2007-09-14  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.c: formatting.

	* app/display/gimpdisplayshell-render.c: removed unused include.

svn path=/trunk/; revision=23545
2007-09-14 13:44:32 +00:00
Sven Neumann a987892954 use TILE_WIDTH for the horizontal offset
svn path=/trunk/; revision=23516
2007-09-12 18:34:04 +00:00
Sven Neumann 1954ee81fe use the offsets module TILE_WIDTH and TILE_HEIGHT instead of doing the
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/base/tile.c (tile_data_pointer): use the offsets module
	TILE_WIDTH and TILE_HEIGHT instead of doing the module operation
	in each and every caller.

	* app/base/boundary.c
	* app/base/pixel-region.c
	* app/base/tile-manager.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-render.c
	* app/paint-funcs/paint-funcs.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpiscissorstool.c: changed accordingly.


svn path=/trunk/; revision=23515
2007-09-12 18:29:11 +00:00
Michael Natterer 15c969c862 use a temporary variable to store the return value of tile_manager_get()
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-09-07 08:35:21 +00:00
Michael Natterer a55fe4cf6f if tile_manager->cached_tile is requested for writing, clear the cache
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-31 10:55:09 +00:00
Sven Neumann 2d1c0dddc5 corrected caluclation for the histogram in RGB mode (bug #466189).
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-08-13 10:34:35 +00:00
Sven Neumann 49bb407674 app/paint-funcs/Makefile.am
2007-08-08  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/Makefile.am

	* app/paint-funcs/sample-funcs.[ch]: renamed to 
	* app/paint-funcs/subsample-region.[ch]

	* app/paint-funcs/scale-funcs.[ch]: renamed to 
	* app/paint-funcs/scale-region.[ch]

	* app/paint-funcs/reduce-region.[ch]: new files based on a patch
	from Geert Jordaens (bug #464466).

	* app/base/tile-manager-preview.c
	* app/core/gimp-transform-region.c
	* app/core/gimpbrush-scale.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable.c: changed accordingly.

svn path=/trunk/; revision=23144
2007-08-08 08:35:45 +00:00
Hans Breuer 024ef60a49 updated msvc build
2007-08-05  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated msvc build


svn path=/trunk/; revision=23118
2007-08-05 15:16:02 +00:00
Sven Neumann 4ed227cf0e app/paint-funcs/Makefile.am app/paint-funcs/scale-funcs.[ch] moved
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-18 12:47:00 +00:00
Sven Neumann 58ee85dfa6 added tile_manager_get_sub_preview().
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 20:33:10 +00:00
Sven Neumann b47a3e52e5 app/base/Makefile.am added new file that holds code to create a preview
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
2007-07-17 19:38:10 +00:00
Sven Neumann 09578ea070 removed extra check for gthread and fold it into the GLIB and GTK checks.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* configure.in: removed extra check for gthread and fold it into
	the GLIB and GTK checks.

	* */Makefile.am: changed accordingly.

	* app/main.c (main): always call g_thread_init().

svn path=/trunk/; revision=22832
2007-06-25 12:41:59 +00:00
Sven Neumann 610feafb3e app/base/base-types.h app/base/tile-manager.[ch] removed accessors for
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed accessors for user_data.
	Instead pass the user_data when setting the validation proc.

	* app/base/tile-pyramid.c
	* app/core/gimpchannel.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/tools/gimpiscissorstool.c: changed accordingly.

svn path=/trunk/; revision=22820
2007-06-21 14:36:58 +00:00
Sven Neumann f2e9d552b2 app/base/tile-manager.[ch] removed "level_below" from the TileManager
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed "level_below" from the
	TileManager struct.
	
	* app/base/tile-pyramid.c: use the TileManager's user_data to
	store a pointer to the lower level.

svn path=/trunk/; revision=22819
2007-06-21 14:13:01 +00:00
Sven Neumann 173c9d40aa use gboolean for boolean parameters.
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.[ch]: use gboolean for boolean parameters.

	* app/base/tile-pyramid.c (tile_pyramid_get_memsize): pass TRUE
	for sparse to tile_manager_get_memsize().

	* app/base/tile.c
	* app/base/tile-swap.c: minor cleanups.

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
	inline the creation of the TilePyramid.

svn path=/trunk/; revision=22818
2007-06-21 14:02:14 +00:00
Sven Neumann 4738f65724 documentation.
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.[ch]: documentation.


svn path=/trunk/; revision=22812
2007-06-21 07:03:23 +00:00
Sven Neumann 3f747cf0e3 added missing implementations for 1 and 3 bytes per pixel.
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.c (tile_pyramid_write_quarter): added missing
	implementations for 1 and 3 bytes per pixel.

svn path=/trunk/; revision=22808
2007-06-20 16:25:53 +00:00
Sven Neumann 3038dc0e80 app/base/Makefile.am app/base/base-types.h image pyramid code split out of
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/tile-pyramid.[ch]: image pyramid code split out of
	GimpProjection.

	* app/core/gimpprojection.[ch]: use the new TilePyramid.

svn path=/trunk/; revision=22807
2007-06-20 16:15:16 +00:00
Sven Neumann 923b06bd0e removed unused function tile_mark_valid().
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/tile.[ch]: removed unused function tile_mark_valid().

	* app/base/tile-manager.[ch]: removed unused public API and cleaned
	up internals used for invalidating tiles.

svn path=/trunk/; revision=22806
2007-06-20 14:25:07 +00:00
Sven Neumann 9c8b7e133e removed unused field swap_num.
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/tile-private.h (struct _Tile): removed unused field
	swap_num.

	* app/base/tile.c (tile_new): initialise most of the Tile struct
	in the allocator.

svn path=/trunk/; revision=22805
2007-06-20 11:59:50 +00:00
Sven Neumann c5a48bbea0 call tile_cache_exit() before tile_swap_exit(). tile_cache_exit() may use
2007-06-13  Sven Neumann  <sven@gimp.org>

	* app/base/base.c (base_exit): call tile_cache_exit() before
	tile_swap_exit(). tile_cache_exit() may use the tile swap in
	pathological cases.

	* app/base/tile-cache.c (tile_cache_exit): warn if the tile cache
	is not empty.

svn path=/trunk/; revision=22772
2007-06-13 13:36:00 +00:00
Sven Neumann 39fb488662 minor cleanup.
2007-06-13  Sven Neumann  <sven@gimp.org>

	* app/base/tile-cache.c: minor cleanup.

svn path=/trunk/; revision=22771
2007-06-13 13:16:05 +00:00
Sven Neumann 345f007049 eliminate calls to sqrt().
2007-06-12  Sven Neumann  <sven@gimp.org>

	* app/base/boundary.c (simplify_subdivide): eliminate calls to sqrt().

svn path=/trunk/; revision=22764
2007-06-12 10:20:36 +00:00
Sven Neumann 5d14b8d2a4 Applied patch from Zbigniew Chyla that further improves the
2007-06-11  Sven Neumann  <sven@gimp.org>

        Applied patch from Zbigniew Chyla that further improves the
        boundary_sort() performance (bug #388538):

        * base/boundary.c (cmp_xy): use "y" coordinate as more 
significant
        one, i.e. compare (ay, ax) to (by, bx), not (ax, ay) to (bx, 
by).

        * configure.in: bumped version to 2.3.19.


svn path=/trunk/; revision=22762
2007-06-11 21:29:59 +00:00
Sven Neumann 04a509b0fe cosmetics
svn path=/trunk/; revision=22751
2007-06-11 07:12:19 +00:00
Sven Neumann 2cb54ef2a4 Applied the second patch from Zbigniew Chyla. Improves boundary_sort()
2007-06-11  Sven Neumann  <sven@gimp.org>

	Applied the second patch from Zbigniew Chyla. Improves
	boundary_sort() performance by reducing its time complexity from
	O(n*n) to ~O(n*log n) (bug #388538).

	* app/base/boundary.c (boundary_sort): prepare two arrays of
	pointers to segments, each sorted by different pair of
	coordinates ((x1,y1) and (x2,y2)); use new find_segment(),
	passing both arrays to it.
	(find_segment): new implementation that employs binary search to
	find matching segment, using sorted arrays prepared by
	boundary_sort().


svn path=/trunk/; revision=22750
2007-06-11 07:04:20 +00:00
Sven Neumann 345855a711 formatting.
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c: formatting.


svn path=/trunk/; revision=22742
2007-06-07 21:55:46 +00:00
Sven Neumann f322854007 app/text/Makefile.am app/core/Makefile.am app/tools/Makefile.am
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/text/Makefile.am
	* app/core/Makefile.am
	* app/tools/Makefile.am
	* app/display/Makefile.am
	* app/widgets/Makefile.am
	* app/base/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* libgimp/Makefile.am
	* libgimpthumb/Makefile.am
	* tools/pdbgen/Makefile.am
	* libgimpwidgets/Makefile.am: applied the remaining parts of the
	patch from Daniel Richard G. to fix out-of-source-tree builds
	(bug #444960).

svn path=/trunk/; revision=22735
2007-06-07 13:19:44 +00:00
Martin Nordholts 7917611e53 Implemented an image pyramid for the GimpProjection. An image pyramid
2007-06-06  Martin Nordholts  <martinn@svn.gnome.org>

	Implemented an image pyramid for the GimpProjection. An image pyramid
	caches a projection at several sizes, causing the rendering code not to
	have to swap in all tiles of a (potentially) large image; it can use
	small versions of the projection if the user is zoomed out.

	The image pyramid also imroves visual quality, especially at zoom levels
	where there is a pyramid level that matches perfectly (i.e. at e.g. 50%,
	25%, and 12.5% zoom). A step on the right track for bug #76096.

	* app/core/gimpprojection.[ch]: Adjusted to make use of an image
	pyramid. GimpProjection now keeps an array of TileManager:s, one per
	pyramid level. Renamed _alloc_tiles to _alloc_levels.

	* app/display/gimpdisplayshell-draw.c: (gimp_display_shell_draw_area):
	Use the right GimpProjection level when drawing

	* app/display/gimpdisplayshell-render.c: (render_image_init_info_full):
	Setup RenderInfo with level in mind

	* app/base/tile-manager.[ch]: Extended API a bit, nothing complicated.

	* app/base/tile-manager-private.h (struct _TileManager): Keep a pointer
	to the level below for use in an image pyramid.


svn path=/trunk/; revision=22727
2007-06-06 13:45:44 +00:00
Sven Neumann 2581c9437e removed unused typedef.
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h: removed unused typedef.

svn path=/trunk/; revision=22654
2007-05-29 09:57:40 +00:00
Sven Neumann 3081e02db0 renamed tile_sanitize_rowhints() to tile_allocate_rowhints().
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/base/tile.[ch]: renamed tile_sanitize_rowhints() to
	tile_allocate_rowhints().
	
	* app/base/tile-manager.c
	* app/paint-funcs/paint-funcs.c: changed accordingly.

svn path=/trunk/; revision=22648
2007-05-29 09:06:15 +00:00
Michael Natterer 91ca374788 allocate tile->rowhint using tile_sanitize_rowhints() (which uses GSlice)
2007-05-28  Michael Natterer  <mitch@gimp.org>

	* app/base/tile-manager.c (tile_manager_get): allocate
	tile->rowhint using tile_sanitize_rowhints() (which uses GSlice)
	instead of g_memdup(). Fixes bug #441878.


svn path=/trunk/; revision=22643
2007-05-28 21:27:15 +00:00
Sven Neumann dc94d7b2f6 cleaning up after my last commit...
svn path=/trunk/; revision=22586
2007-05-22 21:40:24 +00:00
Sven Neumann 9ebc6ae270 allocate structs using GSlice.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c: allocate structs using GSlice.

	* app/base/tile-swap.[ch]
	* app/xcf/xcf-load.c: removed dead code that used to deal with
	swapping from XCF files. Simplified swap file code quite a bit.


svn path=/trunk/; revision=22585
2007-05-22 21:32:09 +00:00
Sven Neumann 1a3abcff9b app/base/tile-manager.[ch] removed unused code.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed unused code.

	* app/base/pixel-surround.c
	* app/base/pixel-region.c: allocate structs using GSlice.

	* app/base/tile.c: allocate TileLink and TileRowHint using 
GSlice.


svn path=/trunk/; revision=22583
2007-05-22 18:29:33 +00:00
Michael Natterer 7654733de9 changed tile_init() to tile_new() and return a GSlice-allocated Tile
2007-05-22  Michael Natterer  <mitch@gimp.org>

	* app/base/tile.[ch]: changed tile_init() to tile_new() and return
	a GSlice-allocated Tile structure.

	(tile_destroy): free it using GSLice.

	* app/base/tile-manager.c: use tile_new() instead of g_new plus
	tile_init(). Also allocate TileManager itself using GSlice.

	* app/xcf/xcf-load.c (xcf_load_parasite): allocate parasites using
	gimp_parasite_new().


svn path=/trunk/; revision=22571
2007-05-22 15:12:30 +00:00
Sven Neumann 6c9cb2ec8b formatting.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager-private.h: formatting.

svn path=/trunk/; revision=22559
2007-05-22 10:51:02 +00:00
Michael Natterer ada79e533a app/actions/data-commands.c app/base/boundary.c app/base/gimphistogram.c
2007-05-22  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/base/boundary.c
	* app/base/gimphistogram.c
	* app/base/gimplut.c
	* app/base/temp-buf.c
	* app/core/gimpcontainer.c
	* app/core/gimpgradient.c
	* app/core/gimpparamspecs.c
	* app/core/gimpundo.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/plug-in/gimppluginmanager-data.c
	* app/plug-in/gimppluginmanager-help-domain.c
	* app/plug-in/gimppluginmanager-locale-domain.c
	* app/plug-in/gimppluginmanager-menu-branch.c
	* app/plug-in/gimppluginprocframe.c
	* app/vectors/gimpanchor.c
	* app/widgets/gimpsessioninfo.c: use GSlice instead of g_new/g_free
	for structs of fixed size.


svn path=/trunk/; revision=22558
2007-05-22 10:43:48 +00:00
Sven Neumann ab30daf8b9 if the invalided tile is the cached tile, release the cached tile. Fixes
2007-05-16  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (tile_invalidate): if the invalided tile
	is the cached tile, release the cached tile. Fixes bug #438802.


svn path=/trunk/; revision=22507
2007-05-16 12:05:15 +00:00
Sven Neumann 0fef82fb16 app/base/gimplut.[ch] app/tools/gimpcurvestool.c reverted the changes done
2007-05-05  Sven Neumann  <sven@gimp.org>

	* app/base/gimplut.[ch]
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: reverted the changes done for bug
	#331782. See the bug report for an explanation.


svn path=/trunk/; revision=22421
2007-05-05 14:29:37 +00:00
Mukund Sivaraman a89d0a1cc8 app/base/gimplut.c app/base/gimplut.h app/tools/gimpcurvestool.c Fixed the
2007-05-05  Mukund Sivaraman  <muks@mukund.org>

        * app/base/gimplut.c
        * app/base/gimplut.h
        * app/tools/gimpcurvestool.c
        * app/tools/gimplevelstool.c: Fixed the value channel color
        correction in the curves and levels tools to only modify the
        value channel and not the hues. Fixes bug #331782.


svn path=/trunk/; revision=22418
2007-05-05 11:51:03 +00:00
Sven Neumann 8f7491f2eb cosmetics.
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c: cosmetics.

svn path=/trunk/; revision=22373
2007-05-02 09:00:46 +00:00
Sven Neumann 4ea83b2c60 documentation fix.
2007-04-16  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: documentation fix.


svn path=/trunk/; revision=22258
2007-04-16 15:02:51 +00:00
Michael Natterer f2acde4c60 app/base/base-types.h remove redundant and inconsistently used MaskBuf
2007-04-13  Michael Natterer  <mitch@gimp.org>

	* app/base/base-types.h
	* app/base/temp-buf.[ch]: remove redundant and inconsistently used
	MaskBuf type and API.

	* app/core/gimpbrush-scale.c
	* app/paint/gimpbrushcore.[ch]: use TempBuf and its API instead.
	This also optimizes away a useless memset() on brush scaling,
	we completely fill each of the created buffers anyway.


svn path=/trunk/; revision=22249
2007-04-13 14:04:37 +00:00
Michael Natterer c6733ac891 app/base/Makefile.am removed these files.
2007-04-01  Michael Natterer  <mitch@gimp.org>

	* app/base/Makefile.am
	* app/base/brush-scale.[ch]: removed these files.

	* app/core/Makefile.am
	* app/core/gimpbrush-scale.[ch]: added the functions here as
	static utility functions. Also move the default implementations of
	GimpBrush::scale_size(), ::scale_mask() and ::scale_pixmap() here,
	including their utility functions.

	* app/core/gimpbrush.c: remove all scale stuff and
	include "gimpbrush-scale.h" instead.

	(gimp_brush_get_new_preview): use GimpBrush's scale functions
	instead of the now private ones. Cleanup.

	(gimp_brush_scale_mask)
	(gimp_brush_scale_pixmap): return a copy of the buf for
	scale == 1.0.


svn path=/trunk/; revision=22213
2007-04-01 13:38:22 +00:00