Commit Graph

22 Commits

Author SHA1 Message Date
Ell e324e2d4b3 app: add gimp_applicator_set_active()
... which allows temporarily turning the applicator into a NOP,
without destroying cached data.

This commit also improves gimp_applicator_set_{src,dest}_buffer().
2020-04-02 18:54:18 +03:00
Ell 733a6ec01c app: skip cache and format conversion when merging a drawable filter
In gimp_drawable_merge_filter(), disable the filter applicator's
cache and output-format conversion nodes before processing the
uncached region of the filter, so that the result is written
directly to the drawable's buffer.
2019-03-25 09:02:27 -04:00
Ell 7534ae53d6 app: rename gimp_applicator_set_preview() to _set_crop(); add _get_crop()
We're going to use GimpApplicator's output crop for more than just
split previews.  Rename gimp_applicator_set_preview() to
gimp_applicator_set_crop(), and add gimp_applicator_get_crop(),
which returns the output crop rectangle, or NULL if cropping is
disabled.
2018-12-30 05:13:00 -05:00
Ell ab52dc6bca app: in GimpApplicator, allow enabling cache/preview after construction; remove preview cache
Remove the use_split_preview and use_result_cache parameters of
gimp_applicator_new(), and allow enabling/disabling the cache
(through gimp_applicator_set_cache()) and the preview crop (through
gimp_applicator_set_preview()) after construction.

Move the preview crop node after the result cache, and remove the
separate preview cache node.  This eliminates an extra cache
buffer, reducing the space consumed by filters, and speeds up split
preview, since the cached result now includes the output
compositing.
2018-12-29 14:28:42 -05:00
Ell b93df0311f app: add gimp_applicator_set_output_format()
In GimpApplicator, add gimp_applicator_set_output_format(), which
can be used to explicitly set the format of the result.  In
particular, this allows controlling the output cache format, which
can speed up the merging of cached filters.
2018-12-28 03:55:33 -05:00
Ell 12e83350bf app: remove gimp_applicator_dup_apply_buffer()
... nothing uses it after last commit.
2018-12-27 14:00:24 -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
Michael Natterer 8634b5cbc3 app: make layer blend color space and compositing color space configurable
...they say it's going to get worse before it gets better...
2017-02-12 23:49:26 +01:00
Michael Natterer 2a96d598c3 app: add internal and PDB API and UI to control a layer's composite mode
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
2017-02-02 00:38:25 +01:00
Michael Natterer 1262370544 app: remove "gboolean linear" parameters
from gimp_applicator_new() and gimp_gegl_mode_node_set_mode().
Compositing doesn't depend on the layer format any longer, only on the
layer mode. Painting with "use applicator" unchecked is still broken
in some cases and needs more fixing.
2017-01-18 00:15:55 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Michael Natterer 265dfec525 app: split GimpApplicator's opacity and mode API into two functions
Added gimp_applicator_set_opacity() and remove the opacity argument
from set_mode().
2016-05-18 01:51:09 +02:00
Michael Natterer a0b18c7929 app: make GimpApplicator's preview feature optional
Don't add the preview nodes if use_preview_cache is FALSE in
gimp_applicator_new().
2016-02-16 21:36:35 +01:00
Michael Natterer e3144ecc4c app: add support for a "preview rectangle" to GimpApplicator
When set, it crops the effect to that rectangle, using a cache for
quickly changing the previewed area. When disabling the preview rect,
make sure we don't lose the cached result by processing it into the
output cache through the mode and affect nodes which is cheap-ish.
2016-02-16 21:36:21 +01:00
Michael Natterer db2ea536da app: add an optional gegl:cache at the output of GimpApplicator
Add "gboolean use_cache" to gimp_applicator_new(). Don't use a cache
anywhere but in GimpImageMap because it incrementally fills that cache
via the projection update. In gimp_drawable_merge_filter(), get that
cache and pass it to gimp_gegl_apply_cached_operation() which then
avoids doing the work twice for the already cached results. Win!
2014-06-18 18:50:53 +02:00
Michael Natterer 987d9e2800 app: add a gegl:copy-buffer to GimpApplicator
which allows to get a buffer copy of the result of the applied
operation without the overhead of running the entire graph again just
for this purpose.
2014-06-01 18:35:18 +02:00
Michael Natterer 9c93df2d4b app: add gimp_drawable_get_linear() which currently always returns FALSE
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer c20838fa26 app: add gimp_applicator_dup_apply_buffer()
which copies a rectangle of the layer mode node's "aux" input into
a newly allocated buffer.
2013-04-22 10:54:05 +02:00
Michael Natterer 69a321ac29 app: turn GimpApplicator into a general-purpose "input + aux -> output" thing
which means adding a lot of proper API. Input, output and aux can be
pads or buffers. Make sure it uses the minimum possible graph in all
cases and doesn't reconfigure nodes unless needed. Port GimpPaintCore
to the new API.
2013-04-14 22:44:21 +02:00
Michael Natterer d0ef6a5af6 app: use gegl_node_blit() in GimpApplicator too
Speeds up applying by at least a factor of two. Patch from Massimo.
2013-03-02 18:50:34 +01:00
Daniel Sabo 4c7dc6a494 app: cache values to speed up GEGL paintbrush
Cache values in GimpApplicator to avoid the overhead of gegl_node_set().
Don't reallocate paint_core->paint_buffer if it's already the correct size.
2012-12-08 19:54:24 +01:00
Michael Natterer 49b579eeb8 app: add GimpApplicator which wraps a graph that applies a buffer to a drawable
and use it in GimpPaintCore, instead of calling
gimp_drawable_apply_buffer() which sets up a new graph for each
call. Makes painting speed bearable again.
2012-05-26 12:36:00 +02:00