1. 02 Dec, 2018 12 commits
    • Piotr Drąg's avatar
      Update Polish translation · 62aae3f3
      Piotr Drąg authored
    • Ell's avatar
      app: fix iterated-over area in gimp_gegl_clear() · 06923d0f
      Ell authored
      Iterate over the per-thread area, not the full region.
    • Ell's avatar
      app: another fix to drawable direct-fill criterion · 42b82419
      Ell authored
      Don't use a direct-buffer fill when filling using a pattern with
      alpha, even when the mode is subtractive.
    • Ell's avatar
      app: fix drawable direct-fill criterion · 660f53d3
      Ell authored
      Don't use a direct-buffer fill if the mode is subtractive, and the
      composite region includes the source.  Currently, this never
      actually happens.
    • Ell's avatar
      app: optimize simple whole-drawable fill/clear · dd8268c0
      Ell authored
      In gimp_drawable_edit_fill(), when filling/clearing the whole
      drawable, without any special compositing (i.e., when there's no
      selection, the opacity is 100%, and the layer mode is trivial),
      fill/clear the drawable's buffer directly, without using an
      applicator.  This makes such operations much faster, especially in
      big images.
    • Ell's avatar
      app: add gimp_fill_options_fill_buffer() · 45fc4cb4
      Ell authored
      ... which is similar to gimp_fill_options_create_buffer(), however,
      it fills an existing buffer, instead of creating a new buffer.
      Implement gimp_fill_options_create_buffer() in terms of the new
    • Ell's avatar
      app: add gimp_layer_mode_is_trivial() · 8adec5fb
      Ell authored
      Add a TRIVIAL layer-mode flag, and corresponding
      gimp_layer_mode_is_trivial() function, which indicates if the blend
      function of a given layer mode is trivial, i.e., either never
      modifies the source pixels (for non-subtractive modes), or always
      clears the destination pixels (for subtractive modes).
    • Ell's avatar
      app: add gimp_gegl_clear() · 2e3eab7f
      Ell authored
      ... which clears the alpha component of a given buffer region,
      i.e., it makes the region transparent, while preserving color
      information.  This corresponds to the "edit-clear" action.
    • Ell's avatar
      app: in GimpPaintCore, align copied undo rect to tile grid · 861f356b
      Ell authored
      In gimp_paint_core_finish(), when copying the relevant region of
      the cached undo buffer into a new buffer, align the region to the
      buffer's tile grid, so that all copied tiles are COWed.  This
      avoids lag when finishing a stroke.
    • Ell's avatar
      app: align drawable undo rectangle to tile grid · bb9dd049
      Ell authored
      When creating a drawable undo from the drawable's buffer, align the
      copied rectangle to the buffer's tile grid, so that all the copied
      tiles are COWed, saving memory and gaining speed.
      Add applied_x and applied_y fields to GimpDrawableUndo, specifying
      the position at which to apply the applied_buffer, so that we apply
      it in the right place, even if the undo rect has changed due to
    • Ell's avatar
      app: use gimp_gegl_rectangle_align_to_tile_grid() in gimp:buffer-source-validate · ce3a6c4f
      Ell authored
      ... instead of custom code.
    • Ell's avatar
      app: add gimp_gegl_rectangle_align_to_tile_grid() · 69e5f783
      Ell authored
      ... which expands a GeglRectangle, such that it's aligned to the
      tile grid of a given GeglBuffer.
  2. 01 Dec, 2018 13 commits
  3. 30 Nov, 2018 5 commits
    • Ell's avatar
      app: use gimp_async_add_callback_for_object() in the bucket-fill tool · 6103f0e5
      Ell authored
      ... for the same reason as commit
    • Ell's avatar
      app: use gimp_async_add_callback_for_object() in various places · 7c00cf49
      Ell authored
      Use gimp_async_add_callback_for_object(), added in the previous
      commit, instead of gimp_async_add_callback(), in cases where the
      destructor of the object owning the async doesn't wait for the
      async to finish.  This avoids leaking such ongoing asyncs on
      shutdown, during which gimp-parallel either finishes or aborts the
      asyncs: if at this point an async has any registered callbacks, an
      idle source is added for running the callbacks, extending the
      lifetime of the async; however, since we're not getting back into
      the main loop, the idle is never run, and the async (and any
      associated resources) are never freed.
    • Ell's avatar
      app: add gimp_async_add_callback_for_object() · 49fd2847
      Ell authored
      ... which is similar to gimp_async_add_callback(), taking an
      additional GObject argument.  The object is kept alive for the
      duration of the callback, and the callback is automatically removed
      when the object is destroyed (if it hasn't been already called).
      This is analogous to g_signal_connect_object(), compared to
    • Ell's avatar
      app: unref async when removing last callback if idle is pending · a779dd38
      Ell authored
      In gimp_async_remove_callback(), if removing the last callback
      while the callback idle-source is already pending, cancel the idle
      source and unref the async object (the async is reffed when adding
      the idle source.)
    • Øyvind "pippin" Kolås's avatar
      app: cache fishes per operation instance in layer-modes · 4dd3e219
      Øyvind "pippin" Kolås authored
      There was a global 3x3 array of babl fishes used for converting between
      blending and compositing pixel representations, these were all hard-coded to
      operate within the sRGB babl-space family. This commit updates a per-instance
      array during operation prepare instead, that comes preconfigured with fishes
      derived from the correct space. Since the same operation instance might get
      different space input during its life time we store and compare the cached
      fishes with the current format (which is unique depending on space).
      This should address the problem seen in issue #2592
  4. 29 Nov, 2018 2 commits
  5. 28 Nov, 2018 8 commits
    • Ell's avatar
      app: use gimp_tile_handler_validate_validate() in gimp:buffer-source-validate · 83dd94ba
      Ell authored
      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
    • Ell's avatar
      app: use gimp_tile_handler_validate_validate() in GimpProjection · d6f0ca55
      Ell authored
      Use gimp_tile_handler_validate_validate(), added in the last
      commit, in GimpProjection, in order to render the projection,
      instead of separately invalidating the buffer, undoing the
      invalidation, and then rendering the graph.  This is more
      efficient, and more idiomatic.
    • Ell's avatar
      app: add gimp_tile_handler_validate_validate() · 82a60997
      Ell authored
      ... which validates a given rectangle directly into the buffer,
      possibly intersecting it with the dirty region.  This is more
      efficient than either invalidating, un-invalidating, and rendering
      a given rect, as we're doing in GimpProjection, or validating the
      buffer tile-by-tile, as we're doing in gimp:buffer-source-validate.
    • Ell's avatar
      app: add GimpTileHandlerValidate::validate_buffer() vfunc · 0ad41cfe
      Ell authored
      ... which is similar to the ::validate() vfunc, however, it should
      render the result to the provided GeglBuffer, instead of to a
      memory buffer.
      Provide a default implementation, which uses
      gegl_node_blit_buffer() if the default ::validate() implementation
      is used, or, otherwise, calls uses
      gegl_buffer_linear_{open,close}(), and passes the returned memory
      buffer to ::validate().
    • Ell's avatar
      app: add GimpTileHandlerValidate::{begin,end}_validate() vfuncs · 5a623fc5
      Ell authored
      Add begin_validate() and end_validate() virtual functions, and
      corresponding free functions, to GimpTileHandlerValidate.  These
      functions are called before/after validation happens, and should
      perform any necessary steps to prepare for validation.  The default
      implementation suspends validation on tile access, so that the
      assigned buffer may be accessed without causing validation.
      Implement the new functions in GimpTileHandlerProjectable, by
      calling gimp_projectable_begin_render() and
      gimp_projectable_end_render(), respectively, instead of calling
      these functions in the ::validate() implementation (which, in turn,
      allows us to use the default ::validate() implementation.)
      In GimpProjection, use the new functions in place of
    • Ell's avatar
      app: avoid starting the chunk renderer while finishing drawing a projection · 8a47b681
      Ell authored
      In gimp_projection_finish_draw(), make sure we don't accidentally
      re-start the chunk renderer idle source while running the remaining
      iterations, in case the chunk height changes, and we need to reinit
      the renderer state.
    • Ell's avatar
      app: avoid flushing bufferless projections · b07f8102
      Ell authored
      Don't needlessly flush projections whose buffer hasn't been
      allocated yet.  This can happen when opening an image, in which
      case the image is flushed before its projection has a buffer.
    • Daniel Mustieles's avatar
      Revert "Updated Spanish translation" · 48335f61
      Daniel Mustieles authored
      This reverts commit 2298c7ab.