Commit Graph

35 Commits

Author SHA1 Message Date
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Ell ab94251ae9 app: remove gimp_gegl_rectangle_align_to_tile_grid()
... and replace it with gegl_rectangle_align_to_buffer().
2019-07-30 20:32:08 +03:00
Ell 7cd768f3d8 app: align mask-undo buffer to tile grid
In GimpMaskUndo, align the copied region to the source buffer's
tile grid, so that all copied tiles are COWed.
2019-01-20 10:06:55 -05:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 08ff2ac8c8 app: use gimp_gegl_buffer_copy() all over the place
Replace all uses of gegl_buffer_copy() in app/ with
gimp_gegl_buffer_copy(), added in the previous commit.
2018-05-25 08:12:27 -04:00
Michael Natterer 539927ebfa app: replace all g_assert() by the newly added gimp_assert()
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
2018-02-11 22:23:10 +01:00
Jehan 4c2df9b365 app: all remaining g_assert() replaced by critical warning and return...
... in app/core.
Continuing on my crusade against asserting and crashing GIMP.
2018-01-22 16:20:04 +01:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
Michael Natterer 68cc8bb86f app: make using gimp_drawable_update() less verbose
Allow passing -1 for the drawable's width/height, instead of requiring
gimp_item_get_width,height() in many callers.
2017-01-13 02:14:40 +01:00
Michael Natterer e90e90265b app: port everything from gimp_channel_bounds() to gimp_item_bounds()
except gimpchannel.c itself.
2015-07-03 19:38:08 +02:00
Øyvind Kolås 7e6320497e follow gegl api changes from commit af5361ca8d, with an abyss policy argument
to gegl_buffer_copy.
2015-05-25 01:27:31 +02:00
Michael Natterer 980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 373a4e7469 app: completely remove TileManager and friends (base/ and paint-funcs/)
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.

The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
2012-06-20 21:44:09 +02:00
Michael Natterer f057aa7932 app: rename GimpMaskUndo::convert-precision to ::convert-format 2012-05-02 17:51:20 +02:00
Michael Natterer c24ff24311 app: when converting an image's precision, don't forget the selection mask 2012-05-02 17:51:19 +02:00
Michael Natterer 90d5624c71 app: use the mask's actual format instead of always float in GimpMaskUndo 2012-05-02 17:51:14 +02:00
Michael Natterer 85b83b65ff app: clean up GimpMaskUndo's GeglRectangle code 2012-05-02 17:51:09 +02:00
Øyvind Kolås 6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer 5a7b7d9a4b app: add gimp_gegl_buffer_get_tile_manager()
and ust it in some get_memsize() functions instead of having a
FIXME. So many files changed because they need to inlcude <gegl.h>
now.
2012-05-02 17:46:07 +02:00
Øyvind Kolås f8b1372038 app: make use of GIMP_GEGL_RECT in more places 2012-05-02 17:46:05 +02:00
Michael Natterer 0bcae125b5 app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer 77bbbab5c6 app: make sure TileManagers and the GeglBuffers backed by them are in sync
by adding gegl_buffer_flush() and gegl_tile_source_reinit() in the
drawable's buffer and tiles API, and at some half-ported places that
mix legacy and gegl code.
2012-05-02 17:45:50 +02:00
Michael Natterer 3975a5e1e7 app: keep the undo mask around as GeglBuffer, not TileManager
which is our first pure GeglBuffer storage, so this code counts
as completely ported \o/
2012-05-02 17:45:50 +02:00
Michael Natterer 2e6a33e02f app: implement GimpMaskUndo with GEGL 2012-05-02 17:45:48 +02:00
Michael Natterer 5e4eee4653 app: implement GObject::constructed() instead of ::constructor() 2011-01-12 22:53:58 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Sven Neumann a5f8345609 added clear_region().
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added clear_region().

	* app/base/tile-manager-crop.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-merge.c
	* app/core/gimpmaskundo.c
	* app/core/gimpprojection-construct.c: use it instead of calling
	color_region() with a zero color.



svn path=/trunk/; revision=26826
2008-09-01 20:44:00 +00:00
Michael Natterer ecb2c46dc8 app/actions/layers-commands.c app/core/gimpchannel-combine.c
2007-12-23  Michael Natterer  <mitch@gimp.org>

	* app/actions/layers-commands.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpchannel-select.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-convert.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpfloatingselundo.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage.c
	* app/core/gimpitem-preview.c
	* app/core/gimpitem.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimplayerundo.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette-import.c
	* app/core/gimpprojection-construct.c
	* app/core/gimpselection.c
	* app/dialogs/offset-dialog.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c: use accessors for item,
	layer, channel and mask attributes.


svn path=/trunk/; revision=24429
2007-12-23 16:58:41 +00:00
Michael Natterer 036085fd9e app/base/temp-buf.c app/base/tile-manager.c accept NULL in all
2007-11-16  Michael Natterer  <mitch@gimp.org>

	* app/base/temp-buf.c
	* app/base/tile-manager.c
	* app/core/gimpobject.c: accept NULL in all get_memsize() functions.

	* app/core/gimp-utils.[ch]: ditto. Added gimp_string_get_memsize().

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpdrawableundo.c
	* app/core/gimpimage.c
	* app/core/gimpitempropundo.c
	* app/core/gimplayer.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugindef.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/text/gimptextundo.c
	* app/vectors/gimpvectorsmodundo.c: simplify
	GimpObject::get_memsize() implementations accordingly.

	* app/core/gimpimageundo.c: ditto. Always keep around colormaps in
	chunks of GIMP_IMAGE_COLORMAP_SIZE to be coonsistent with the
	other colormap handling code.


svn path=/trunk/; revision=24174
2007-11-16 18:19:30 +00:00
Michael Natterer d0df7dae38 app/core/gimpmaskundo.c implement GimpObject::get_memsize() instead of
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpmaskundo.c
	* app/core/gimpitempropundo.c: implement GimpObject::get_memsize()
	instead of fiddling with undo->size.


svn path=/trunk/; revision=21828
2007-01-31 22:06:01 +00:00
Michael Natterer 9020afcf22 renamed these files...
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannelundo.[ch]: renamed these files...

	* app/core/gimpmaskundo.[ch]: ...to these. We'll need the name
	GimpChannelUndo for something else later.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimage-undo-push.c: changed accordingly.


svn path=/trunk/; revision=21819
2007-01-30 22:53:18 +00:00