Commit Graph

12 Commits

Author SHA1 Message Date
Ell faf6acfb67 app: add "chunked" parameter to gimp_tile_handler_validate_validate()
... which allows validating the area in chunks, instead of in a
single step.
2020-03-14 13:54:57 +02:00
Ell bb8ee0e686 app: handle GimpTileHandlerValidate::invalidated in gimp:buffer-source-validate
In gimp:buffer-source-validate, invalidate the node in response to
GimpTileHandlerValidate::invalidated, added in the previous commit,
in addition to GeglBuffer::changed.
2020-01-15 21:50:11 +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 7489f0aece app: replace use of deprecated dont-cache/no_cache with cache-policy
Replace the use of the deprecated GeglNode::dont-cache property,
and GeglOperationClass::no_cache field, with GeglNode::cache-policy
and GeglOperationClass::cache_policy, respectively.

See commit gegl@7f24430cda0d8c3eff311868823d445edc2a4e12.
2019-02-21 13:09:45 -05:00
Ell ce3a6c4fd6 app: use gimp_gegl_rectangle_align_to_tile_grid() in gimp:buffer-source-validate
... instead of custom code.
2018-12-02 03:10:28 -05:00
Ell 83dd94ba6a app: use gimp_tile_handler_validate_validate() in gimp:buffer-source-validate
Use gimp_tile_handler_validate_validate(), added in the commit
before last, in gimp:buffer-source-validate, in order to pre-render
the necessary region of the buffer, instead of performing the
validation implicitly by iterating over the region.  This is both
simpler, and, more importantly, allows us to render the entire
region in a single chunk, instead of tile-by-tile, which can be
considerably more efficient, especially with high thread counts.

This essentially extends the dynamic sizing of rendered projection
chunks to layer groups, which are rendered through
gimp:buffer-source-validate, rather than just the main image
projection.
2018-11-28 13:26:40 -05:00
Øyvind Kolås 95358ca1fa app: migrate operationbuffersourcevalidate to new iterator api 2018-09-11 01:46:10 +02: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 956ca8e3a3 app: small fix to gimp_operation_buffer_source_validate_process()
Fix tile-grid realignemnt after intersecting the ROI with the dirty
region.
2018-03-26 19:15:20 -04:00
Ell caa3a98f04 Bug 790810 - Nested layer groups lead to a deadlock with multithreading
In gimp_operation_buffer_source_validate_process(), align the ROI
to the tile grid *before* intersecting it with the validate-
handler's dirty region.  This is necessary since, even though
subsequent operations will only read data within the ROI, the
entire tiles containing the ROI will be fetched, resulting in an
area potentially greater than the ROI.  We need to validate this
area in advance, or else it will be validated as part of the
subsequent operations, which can lead into the same deadlock we're
trying to prevent.
2018-03-26 19:04:34 -04:00
Ell 07355803a8 app: use gegl_buffer_signal_connect() in gimp:buffer-source-validate
... instead of g_signal_connect(), to connect to the buffer's
"changed" signal.
2018-02-07 09:54:08 -05:00
Ell dec2375a26 app: add gimp:buffer-source-validate operation
gimp:buffer-source-validate is a drop-in replacement for
gegl:buffer-source, however, if the attached buffer has a
validating tile-handler, it makes sure the required region is
validated during process().  This avoids a situation in which
validation happens in different worker threads at the same time
during the processing of a succeeding operation; since validation
is protected by the buffer's tile-storage mutex, this can result in
either a deadlock (currently), or an effective fallback to single-
threaded processing.
2017-12-04 16:02:41 -05:00