Commit Graph

42700 Commits

Author SHA1 Message Date
Ell
55569d512e app: in gimp_drawable_apply_buffer(), work in chunks
In gimp_drawable_real_apply_buffer(), use GimpChunkIterator to blit
the applicator's output to the drawable's buffer in chunks, to
minimize the space used for intermediate results.

(cherry picked from commit 8f845d3a51)
2019-03-27 15:47:39 -04:00
Ell
7c6125ce67 app: improve responsiveness of GimpChunkIterator
In GimpChunkIterator, redajust the target area at each step,
instead of at each iteration, to adapt more quickly to the current
processing speed.  To avoid creating uneven chunks as a result,
only change the chunk height at the beginning of rows, unless the
resulting area would be more than twice as big as the target area.

(cherry picked from commit e904b71242)
2019-03-27 15:47:38 -04:00
Ell
f81c1cac10 app: preserve projection priority rect across structure/bounds changes
In GimpProjection, store the priority rect in image coordinates,
and only convert it to projectable coordinates when initializing
the chunk-iterator's priority rect.  This allows us to preserve the
priority rect across projectable structure/bounds changes.

(cherry picked from commit 9d80ccc3e6)
2019-03-26 04:58:57 -04:00
6473daa05b Update Ukrainian translation 2019-03-25 21:33:10 +00:00
bb747c58ed Update Ukrainian translation 2019-03-25 20:06:19 +00:00
03c98739bd Update Ukrainian translation 2019-03-25 20:05:04 +00:00
7d3b935327 Update Ukrainian translation 2019-03-25 20:03:58 +00:00
b9375a3873 Update Ukrainian translation 2019-03-25 20:01:52 +00:00
81afa73bf3 Updated Greek translation 2019-03-25 19:44:45 +02:00
Ell
ebaf09e7cc app: don't disable filter format conversion if != drawable format
In gimp_drawable_merge_filter(), don't disable the filter
applicator's output-format conversion node if the output format is
different than the drawable's format, since it may change the
result.

(cherry picked from commit 30da2f3d6f)
2019-03-25 09:16:26 -04:00
Ell
269f2ca0fc 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.

(cherry picked from commit 733a6ec01c)
2019-03-25 09:02:31 -04:00
Ell
fef2c3423a app: small fix to gimp_gegl_mask_combine_ellipse_rect()
(cherry picked from commit d4689441fe)
2019-03-24 14:45:59 -04:00
Ell
9ac360a125 Issue #3142 - Filters on-canvas preview doesn't work ...
... immediately after an image precision change

When flushing a projection, make sure it has a buffer, instead of
bailing if it doesn't.  We rely on the image projection's "update"
signal to update the display after certain operations that free the
buffer, which would previously fail to happen, and cause subsequent
flushes to be ignored until the buffer is explicitly accessed.

This fixes commit b07f810273.

(cherry picked from commit 106df3b794)
2019-03-24 03:20:43 -04:00
8f3da0e8c4 Allow compilation on MacOS 10.5 leopard: issues #2923, #2924 and #2925 2019-03-23 23:33:07 +00:00
f540f6c0a5 Updated Slovenian translation 2019-03-22 21:51:38 +01:00
6a38c58cda Updated Slovenian translation 2019-03-22 21:50:49 +01:00
e5026997b9 Updated Slovenian translation 2019-03-22 21:46:14 +01:00
f1c5b3978a Updated Slovenian translation 2019-03-22 21:34:43 +01:00
041107f801 Updated Slovenian translation 2019-03-22 21:28:18 +01:00
Ell
b8d94342ca Issue #3134 - Deleting last layer of group not updating image
In gimp_group_layer_get_size(), make sure to always set *width and
*height, even when the group is empty, so that when the function is
called through gimp_projectable_get_size() by the group's
projection, the correct size is reported.  This makes sure we
update the correct area when the group becomes empty.

(cherry picked from commit a712308f20)
2019-03-20 17:51:21 -04:00
Ell
dc8fad6ac6 app: improve gimpchannel-{combine,select}
In gimpchannel-select, move some of the common functionality of the
various gimp_channel_select_foo() functions to gimpchannel-combine.
Furthermore, don't special-case CHANNEL_OP_INTERSECT, but rather
pass it over to gimpchannel-combine, which is now prepared to
handle it in all functions, as per the previous commits.

In gimpchannel-combine, factor out the common functionality of the
various gimp_channel_combine_foo() functions into a pair of
gimp_channel_combine_{start,end}() functions, which are called
before/after the actual gimp_gegl_mask_combine_foo() function,
respectively.  In particular, these functions deal with calculating
the new channel bounds.  Previously, the various
gimp_gegl_mask_combine_foo() functions would implicitly invalidate
the channel bounds (since commit
d0ae244fe8), rendering the bounds-
recalculation code ineffective.  This avoids manually recalculating
the bounds in many cases, speeding up selection operations.

(cherry picked from commit 8e77347cac)
2019-03-20 16:27:55 -04:00
Ell
fa79923d4b app: improve gimp_gegl_mask_combine_buffer()
Simplify code, use gimp_gegl_buffer_copy() for CHANNEL_OP_REPLACE
when possible, improve value clipping, and parallelize processing.

(cherry picked from commit a227c8e94d)
2019-03-20 16:27:55 -04:00
Ell
9b76ea070d app: improve gimp_gegl_mask_combine_ellipse[_rect]()
Improve gimp_gegl_mask_combine_ellipse_rect() -- the funciton
responsible for rendering ellipse/rounded-rectangle selections.

Most notably, this commit significantly improves the function's
performance, by identifying whole tiles, whole rows, or parts of a
row, that are fully inside, or fully outside, the ellipse, and
filling them in bulk, instead of calculating the anti-aliasing
value at each pixel, which is now only done along the
circumference.

This commit also improves anti-aliasing, by more accurately
approximating the distance from a pixel to the ellipse, and by
normalizing the distance according to the pixel's cross-section
length in the direction of the said point.  In particular, we
guarantee that pixels that are fully inside/outside the ellipse
have a value of 1/0, respectively, facilitating the aforementioned
optimization.

Additionally, this commit fixes various edge cases where several
primitives coincide at a single pixel (in the rounded-rectangle
case), adds support for CHANNEL_OP_INTERSECT, and parallelizes
processing.

(cherry picked from commit 1044342393)
2019-03-20 16:27:55 -04:00
Ell
d0a3d81c4a app: improve gimp_gegl_mask_combine_rect()
Simplify the code, and add support for CHANNEL_OP_INTERSECT.

(cherry picked from commit 8a6e1c907d)
2019-03-20 16:27:55 -04:00
Ell
15e8b53f0c app: convert gimp-gegl-mask-combine to C++
... in preparation for next commits.

(cherry picked from commit 5198d3c32d)
2019-03-20 16:27:55 -04:00
Ell
2a2ad4324d app: add gimp_babl_format_change_{component_type,linear}()
... which change a format's component-type/TRC, without otherwise
affecting it.
2019-03-20 16:27:55 -04:00
Ell
5c70b827d2 app: add gimp_babl_is_bounded()
... which takes a GimpPrecision, and determines if its values are
bounded to the [0,1] range (which is currently only true for
integer precisions).

(cherry picked from commit d7f12c9d26)
2019-03-20 16:27:55 -04:00
2675e944e3 app: make gimp_prop_gui_chain_toggled() less error-prone.
Don't assume that "toggled" signal means that toggle status actually
changed.

Though issue #3133 got fixed with my previous commit, let's make sure we
never create several GBinding for the same GimpChain by always checking
existence of a previous one after a "toggled" signal.
Also only create a GBinding object if one doesn't already exist.

(cherry picked from commit 9042e85f3c)
2019-03-20 15:12:25 +01:00
2ebf56850e Issue #3133: Gimp freezes after selecting a filter preset and...
... clicking a GimpChain.
Since commit c0c055b4e9, gimp_chain_button_set_active() emits the
"toggled" signal. There is no need to emit it separately from
GimpOperationTool when setting presets with
gimp_operation_tool_set_config().

In particular, since the "toggled" signal was even sent unconditionnally
here, our code was ending creating several GBinding for the same 2
adjustments, which was creating an infinite loop.

(cherry picked from commit 03dc24455a)
2019-03-20 15:12:19 +01:00
199f9f13a5 app: fixes g_object_unref: assertion 'G_IS_OBJECT (object)' failed.
"binding" data can be set to NULL. Do not assume it is a proper object.

Also I was tempted to use g_object_set_data() to simply free the
GBinding object on setting a new data, but such object will also be
freed when the widget is destroyed by default. So that would also end up
in double destruction. Instead just keep current logics.

This CRITICAL was reported in #3133 but this is not the main bug.

(cherry picked from commit af6760b3c9)
2019-03-20 15:12:13 +01:00
66c47ee23f plug-ins: do not needlessly free/malloc() buffer of same size.
In an animated WebP, chances that layers/frame have the same size is
high. It is uneeded to free then malloc again a buffer at each frame,
unless we need more allocated memory.
This is probably not so significant, but still feels nicer.

(cherry picked from commit 0b68ce8182)
2019-03-19 12:54:13 +01:00
4721643176 Update Marathi translation 2019-03-18 16:29:18 +00:00
520b4fbf18 Update Marathi translation 2019-03-18 16:27:13 +00:00
c15069797e Update Marathi translation 2019-03-18 11:12:37 +00:00
2a83ce9abe Update Marathi translation 2019-03-18 11:11:30 +00:00
9cf206f350 Update Marathi translation 2019-03-18 10:38:01 +00:00
05e9bb7b3f Update Marathi translation 2019-03-18 10:35:58 +00:00
b46d89257a Update Marathi translation 2019-03-15 12:25:58 +00:00
6956a403d0 Update Marathi translation 2019-03-15 12:24:03 +00:00
d67359f096 Updated Italian translation 2019-03-14 17:50:11 +01:00
28860c12dc Update Icelandic translation 2019-03-14 07:59:52 +00:00
e3fe627faa Update Polish translation 2019-03-13 18:11:45 +01:00
Ell
f8aec23e33 app: avoid pushing undo while updating colormap entries
In GimpColormapEditor, while updating a colormap entry, only push
an undo step when confirming the new color.

(cherry picked from commit 506f412a05)
2019-03-13 10:57:19 -04:00
Ell
68f5bc63b6 app: more "Readjust" improvements
... technical stuff.

(cherry picked from commit 1e89c161c5)
2019-03-13 10:12:12 -04:00
1b9fdddc78 Update Icelandic translation 2019-03-13 11:01:44 +00:00
4d08f75978 Update Icelandic translation 2019-03-13 10:48:33 +00:00
b3e34ccbae Update Turkish translation 2019-03-13 10:38:08 +00:00
282adfd581 Update Icelandic translation 2019-03-13 10:06:58 +00:00
3c68387e15 Update Icelandic translation 2019-03-13 09:55:23 +00:00
Ell
581944253c app: improve transform-tools readjustment
In GimpTransformGridTool, extend the functionality of the
"Readjust" button, such that if the transformation is already
adjusted to the view (i.e., when the button is clicked the second
time), readjust the transformation to the item bounds (as when
using the tool "normally"), and vice versa.  This allows switching
back and forth between "normal" mode, and "adjusted-to-view" mode.

Additionally, disable readjustment when the current transforamtion
is invalid, and show an error when readjustment results in an
invalid transformation.

(cherry picked from commit a3fa3b6181)
2019-03-13 05:28:36 -04:00