Commit Graph

496 Commits

Author SHA1 Message Date
Ell 80de723022 app: add GimpAsyncSet
GimpAsyncSet represents a dynamic set of running GimpAsync objects.
The objects are automatically removed from the set once they're
synced.

GimpAsyncSet implements the GimpWaitable and GimpCancelable
interfaces, allowing the entire set to be waited-on or canceled.

Additionally, GimpAsyncSet provides an "empty" property, which
indicates whether the set is empty or not.  This allows responding
to the completion of all the GimpAsync objects through the set's
"notify::empty" signal, or drive UI changes through property
bindings.
2018-05-29 16:04:28 -04:00
Ell 4cc92ebd74 app: add GimpUncancelableWaitable
GimpUncancelableWaitable is a simple proxy object for another
GimpWaitable object, implementing only the GimpWaitable interface.
Its main purpose is to mask away the cancelability of an object
implementing both GimpWaitable and GimpCancelable.
2018-05-29 16:04:28 -04:00
Michael Natterer 4e472986c2 app: force gimp-tool-cursors.c to be linked into the binary 2018-05-28 20:20:13 +02:00
Ell 86b89cf62a app: add gimp-parallel
Add gimp-parallel.[cc,h], which provides a set of parallel
algorithms.

These currently include:

  - gimp_parallel_distribute():  Calls a callback function in
    parallel on multiple threads, passing it the current thread
    index, and the total number of threads.  Allows specifying the
    maximal number of threads used.

  - gimp_parallel_distribute_range():  Splits a range of integers
    between multiple threads, passing the sub-range to a callback
    function.  Allows specifying the minimal sub-range size.

  - gimp_parallel_distribute_area():  Splits a rectangular area
    between multiple threads, passing the sub-area to a callback
    function.  Allows specifying the minimal sub-area.

The callback function is passed using an appropriately-typed
function pointer, and a user-data pointer.  Additionally, when used
in a C++ file, each of the above functions has an overloaded
template version, taking the callback through a generic parameter,
without a user-data pointer, which allows using function objects.
2018-04-04 17:49:46 -04:00
Michael Natterer 452b1bd558 Stop leaking properties of the distcheck machine into the tarball
Some gimprc properties' default values depend on the machine where
"make dist" in run. We had an ugly hack in place to force
(num-processors 1) in the installed system gimprc and its manpage, but
were still leaking "tile-cache-size" and "mypaint-brush-path".

The files are generated by the hidden options --dump-gimprc-system
and --dump-gimprc-manpage which exist only for this purpose.

In gimpconfig-dump.c, special case the three properties in
dump_gimprc_system() and dump_gimprc_manpage() to output constant
default values for "num-processors" and "tile-cache-size" and
output @mypaint_brushes_dir@ in "mypaint-brush-path" which can
be replaced at configure time.

Also introduce etc/gimprc.in so @mypaint_brushes_dir@ can actually be
substituted for the installed system gimprc.
2018-03-30 13:19:22 +02:00
Michael Natterer 614b81ffb4 app, tools: rename "gimpdebug" to "gimp-debug-tool"
and use GIMP_TOOL_VERSION instead of hardcoding "2.0" in both
tools/Makefile.am and app/errors.c
2018-02-04 14:09:22 +01:00
Jehan 44f23bdf0c app: move git-version.h generation to the repository root.
The reason is that this file is now included for a binary in tools/ as
well (the debug binary) and tools/ contents needs to be built before
app/. Even using BUILT_SOURCES in the Makefile under app/ is not enough.
Anyway it makes sense that this file should be under the root of the
repository since that describes the status of the source repository. So
let's move it up one folder.
2018-01-29 20:17:41 +01:00
Jehan 1b4efd2d5a app, tools: rename app/version.[ch] to app/gimp-version.[ch].
Since commit 9fdf35550b, I removed the GIMP_APP_GLUE_COMPILATION check
because we need to have the whole versioning info from the new debug
widget. It just makes sense to go further and just make this a proper
internal API to get version information.
2018-01-29 01:48:30 +01:00
Jehan b318694bb2 app, tools: install the debug tools in libexec when appropriate.
AFAIK this means on all platforms but Win32 and macOS which would rather
need relative path and therefore cannot make use of build-time
LIBEXECDIR. Anyway on these platforms, leaving the binary in BINDIR is
not likely to "pollute" too much as it would on Linux or BSD where
people often use terminal.
2018-01-28 15:43:07 +01:00
Ell 09c2ba4cc2 app: fix git-version.h when building linked working tree
When building a linked working tree, $(top_srcdir)/.git is a
regular file, and not a directory.  Change the recipe for
git-version.h to allow that.
2017-12-06 04:50:02 -05:00
Jehan 2c19ea2145 app: add compiler info in `gimp -v`. 2017-09-10 01:21:55 +02:00
Ell 71bbd88e00 app: layer mode code shuffling
Commit 3635cf04ab moved the special
handling of bottom-layer compositing to GimpOperationLayerMode.
This required giving the op more control over the process()
function of its subclasses.  As a temporary workaround, the commit
bypassed the subclasses entirely, using "gimp:layer-mode" for all
modes.  This is the reckoning :)

Add a process() virtual function to GimpOperationLayerMode, which
its subclasses should override instead of
GeglOperationPointComposer3's process() functions.  Reinstate the
subclasses (by returning the correct op in
gimp_layer_mode_get_oepration()), and have them override this
function.

Improve the way gimp_operation_layer_mode_process() dispatches to
the actual process function, to slightly lower its overhead and
fix some thread-safety issues.

Remove the "function" field of the layer-mode info array, and have
gimp_layer_mode_get_function() return the
GimpOperationLayerMode::process() function of the corresponding
op's class (caching the result, to keep it cheap.)  This reduces
redundancy, allows us to make the ops' process() functions private,
and simplifies SSE dispatching (only used by NORMAL mode,
currently.)

Move the blend and composite functions of the non-specialized
layer modes to gimpoperationlayermode-{blend,composite}.[hc],
respectively, to improve code organization.

Move the SSE2 composite functions to a separate file, so that they
can be built as part of libapplayermodes_sse2, allowing
libapplayermodes to be built without SSE2 compiler flags.  This
allows building GIMP with SSE acceleration enabled, while running
the resulting binary on a target with no SSE accelration.

Add a "blend_function" field to the layer-mode info array, and use
it to specify the blend function for the non-specialized modes.
This replaces the separate switch() statement that we used
previously.

Remove the "affected_region" field of the layer-mode info array.
We don't need it anymore, since we can go back to using
GimpOperationLayerMode's virtual get_affected_region() function.

Last but not least, a bunch of code cleanups and consistency
adjustments.
2017-08-17 11:19:37 -04:00
Michael Natterer e8ee5475b7 app: move all propgui files from app/widgets/ to new folder app/propgui/
We are getting more and app/widgets/ is already too large.
2017-07-03 12:29:41 +02:00
Ell c97209ba4a app: fix abbreviated commit hashes
The abbreviated commit hash we show in the shell and the about
dialog is currently just the last 7 characters of 'git describe',
based on the assumption that abbreviated hashes are always 7-digits
long.  When the hash is longer than that, we're just showing a
nonsense commit.

This was never a good idea, since users can override this, and
since disambiguation can result in longer hashes, but since git
2.11, the default abbreviated hash length is determined based on
the size of the repository, which currently results in 10 digits
for us.

Let's just do it right.
2017-03-21 23:05:42 -04:00
Michael Natterer 2dbf1b46b2 app: rename gimp_layer_mode_is_linear() to gimp_layer_mode_wants_linear_data() 2017-01-31 01:43:48 +01:00
Michael Natterer dd3eec6198 app: change linking order of the sub-libs of app/operations
so layer-modes/ can use the enums in enums-types.h without failing to
link.
2017-01-17 14:28:40 +01:00
Michael Natterer a24e232522 app: move functions on enum GimpLayerMode to new files gimp-layer-modes.[ch] 2017-01-15 15:25:03 +01:00
Michael Natterer fd070eeb25 app: start moving layer modes into their own build directories
New directories:

operations/layer-modes/
operations/layer-modes-legacy/
2017-01-09 21:58:18 +01:00
Michael Natterer 0ce364ee4d configure.ac, app: require liblcms2 >= 2.7
and add an lcms2 runtime version check to app/sanity.c

Fixes:
Bug 736701 - LCMS2 rounding errors cause problems with certain GIMP blend modes
2016-09-15 12:52:20 +02:00
Michael Natterer 631110e061 app: merge units.[ch] into core/gimp-units.[ch]
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
2016-09-12 23:51:29 +02:00
Jehan ff5587cd53 app: fix win32 build with Dr. MinGW.
GIMPDIR and GIMP_USER_VERSION macros need to be defined in app/ as well!
2016-06-12 04:04:11 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Mukund Sivaraman 6a6604871f windows: Add support for generating crash backtraces using Dr. MingW 2016-01-02 18:55:37 +05:30
Daniel Sabo c97a529968 app: Change mypaint dependency from libmypaint-gegl to just libmypaint 2015-12-28 09:18:46 -08:00
Michael Natterer cb8e16aae8 app: move app/batch.[ch] to app/core/gimp-batch.[ch]
There is no reason batch processing should be considered "glue code".
2015-09-30 01:57:33 +02:00
Michael Natterer 4266f86e08 app: remove tons of linker workarounds from Makefilea
either linkers got smarter or our structure got better, or this breaks
on whatever other linkers again...
2015-08-27 21:44:15 +02:00
Michael Natterer 46eef4d09d app: remove references to plug_in_icc_profile_apply_rgb() from Makefiles 2015-08-27 13:52:26 +02:00
Jehan 77b04551c8 app: clean compilation with external libmypaint.
The work-in-progress was using a source tree of libmypaint embedded
into GIMP tree. This is a cleaning with pkg-config test in configure,
and correct includes.
2015-03-30 22:38:35 +02:00
Michael Natterer 071ede915a app: first draft of GimpMybrushTool, which uses MyPaint brushes 2015-03-30 22:38:34 +02:00
Michael Natterer 4c7338c097 app: link against -lm, whatever new linker version seems to need is 2015-02-16 19:35:00 +01:00
Michael Natterer 9095f8998d app: link against Z_LIBS 2014-09-17 00:21:41 +02:00
Michael Natterer 26f45822e7 app: port gimpconfig-dump.c to GIO 2014-08-12 12:59:12 +02:00
Michael Natterer c88800e840 app: add gimp-priorities.h and keep the most important priorities there
also add comments with all predefined priorities as documentation.
2014-07-02 04:47:24 +02:00
Mukund Sivaraman 81e955ed1b build: Add HarfBuzz dependency 2014-05-03 00:27:47 +05:30
Michael Natterer ed13993aff app: use a GimpColorProfileView in GimpImageProfileView
and parse the profile in gimpimageprofileview.c instead of calling the
lcms plug-in. Make the app link against lcms. This is WIP because the
widget is of course the wrong place for such profile parsing code.
2014-03-16 18:36:12 +01:00
Shlomi Fish e4260434b6 app: Fix compiliation if gexiv2/gexiv2.h is not in the default include path. 2013-12-24 11:46:16 -05:00
Daniel Sabo e56344294c app: Port to gtk-mac-integration
Replace deprecated Carbon APIs with Cocoa.

Includes code by:
Simone Karin Lehmann
Michael Natterer
Daniel Sabo
2013-11-10 18:22:01 +01:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Nils Philippsen 7c7c8de165 app: fix off-root builds
Source file ("unique.c") includes header file from subdirectory
("gui/gimpdbusservice.h") which includes generated header file
("gimpdbusservice-generated.h").

In off-root builds this file isn't created in the same directory,
therefore the directory needs to be explicitly added as an include path.
2013-05-29 11:22:27 +02:00
Michael Henning c249387df8 app: Fix -u flag to refer to GimpSettings, not GimpImageMapConfig 2013-05-25 11:11:28 -04:00
Jernej Simončič 1043216424 Windows: #588015 - Make sure that GIMP is Terminal-Server-aware
(cherry picked from commit 4b9af78336)
2013-01-22 23:13:49 +01:00
Michael Natterer 205645b163 app: add -framework Carbon to LDFLAGS on OSX
I have no clue how anyone was able to build since this
got broken.
2012-09-09 20:08:18 +02:00
Michael Natterer 6ed173811c app: remove obsolete -u smooth_region from Makefile.am 2012-08-09 19:39:48 +02: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 b058137145 Bug 676389 - Compilation fails using clang because of -u options passed to linker
Use -Wl,-u,symbol to makes things build instead of just -u symbol.
2012-05-20 19:29:44 +02:00
Michael Natterer 06c59973d3 app: remove the entire legacy composition code 2012-05-19 00:41:43 +02:00
Michael Natterer 07cc3976ca app: remove the !use_gegl case from gimpimage-merge.c 2012-05-19 00:19:49 +02:00
Michael Natterer 9112d68488 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
2012-05-12 14:39:44 +02:00
Michael Natterer 7ccd10748d app: fix typo in Makefile.am: s/SYNPREFIX/SYMPREFIX/ 2012-05-10 21:36:24 +02:00