1. 05 Aug, 2018 2 commits
  2. 04 Aug, 2018 4 commits
    • Jehan's avatar
      Issue #1974: Memory leak in gimpimage.c. · 2912fe7c
      Jehan authored
      Ok my previous fix was wrong (at least for the part in the macro). This
      is a macro, not a function. So each time we write _reason, the call to
      g_strdup_printf() is reevaluated, hence data is allocated.
      The right fix is to prepend `tmp` to the list, not `_reason`.
      Thanks to Massimo for the debugging, as always!
    • Jehan's avatar
      Issue #1974: Memory leak in gimpimage.c. · 0ab682b0
      Jehan authored
      ADD_REASON macro was leaking the allocated string when version_reason
      return value was NULL (i.e. when we didn't care about the version
      Also we were not properly freeing all the reason strings at the end,
      only the list. Use g_list_free_full() instead of g_list_free().
    • Ell's avatar
      app: short-circuit GimpProjection bounds-changed handler if disjoint · c6b8a421
      Ell authored
      In gimp_projection_projectable_bounds_changed(), bail early by
      calling gimp_projection_projectable_structure_changed() instead, if
      the new bounds don't intersect the old bounds.
    • Ell's avatar
      app: fix gimp_projection_projectable_bounds_changed() · bb5e3fd9
      Ell authored
      In gimp_projection_projectable_bounds_changed(), which is called by
      GimpProjection in response to a GimpProjectable::bounds-changed
      signal, invalidate all regions of the new projection that weren't
      copied from the old projection, so that they get rendered upon
      flushing, instead of remaining empty.
      Additionally, fix preview invalidation -- in particular, don't
      directly invalidate the projectable's preview, even if preview
      invalidation is already queued and chunk rendering was finished by
      the boundary change, and instead always queue a preview
  3. 03 Aug, 2018 10 commits
    • Ell's avatar
      app: avoid re-rendering group layers upon resizing · bd726c96
      Ell authored
      Make sure we don't unnecessarily update the group layer's drawable
      while flusing the group's projection during resizing, since we want
      to either update the entire drawable, or avoid any updates, when
      replacing the drawable's buffer.  Note that explicitly supressing
      updates in this case should theoretically not be necessary, but the
      fact that the call to gimp_projectable_bounds_changed() can result
      in reconstructing the projection (see the FIXME comment in that
      function) makes it necessary in some cases nonetheless.
    • Ell's avatar
      app: avoid re-rendering group layers upon translation · 3ff820a0
      Ell authored
      When translating group layers, there's no need to re-render the
      group's projection -- we can simply update the group's offset (and
      offset node) directly, and redirect any layer-stack "update"
      signals to the group's drawable.  This significantly improves
      performance when moving groups.
    • Ell's avatar
      app: use gimp_projectable_bounds_changed() when resizing group layers · 1bb3e962
      Ell authored
      In GimpGroupLayer, use gimp_projectable_bounds_changed() when
      updating the group layer's size, instead of reconstructing the
      projection, unless reallocation of the projection has been
      requested.  This is more efficient, since it simply copies the
      content of the projection's old buffer to the new buffer, rather
      than re-rendering the graph.
    • Ell's avatar
      app: stop idle projection rendering when flushing group layers · a4957c7c
      Ell authored
      In gimp_group_layer_flush(), stop any idle rendering, initiated
      when a new buffer is allocated, before flushing the group's
      pickable.  Otherwise, the idle rendering is finished synchronously,
      which unnecessarily introduces a noticeable lag.
    • Ell's avatar
      app: add "update" parameter to gimp_drawable_set_buffer_full() · 26a8d141
      Ell authored
      ... which specifies whether or not to update the drawable in
      response to the buffer change.
      Pass TRUE for "update" at all existing call sites, to keep the
      current behavior.
    • Ell's avatar
      app: respond to GimpProjectable::bounds-changed in GimpProjection · fbeae361
      Ell authored
      In GimpProjection, respond to the projectable's "bounds-changed"
      signal, by reallocating the buffer, and copying the corresponding
      region of the old buffer (using
      gimp_tile_handler_validate_buffer_copy(), added a few commits back,
      so that the relevant portion of the validate handler's dirty region
      is also copied).  Additionally, shift and clip all outstanding
      update regions as necessary (actually, we avoid copying the buffer
      when a shift is necessary, and simply reconstruct the projection;
      see FIXME comment in the code.)
    • Ell's avatar
      app: add GimpProjectable::bounds-changed signal · 460c3d13
      Ell authored
      ... and a corresponding gimp_projectable_bounds_changed() function.
      This signal can be emitted by implementers of GimpProjectable,
      instead of the GimpProjectable::structure-changed signal, when the
      projectable's bounds change, but its content does not -- i.e., the
      old content simply gets cropped to the new bounds.
    • Ell's avatar
      app: add gimp_tile_handler_validate_buffer_copy() · eeed4778
      Ell authored
      Add gimp_tile_handler_validate_buffer_copy(), which can be used
      instead of gegl_buffer_copy(), to copy a (subregion of a) source
      buffer to a destination buffer with a GimpTileHandlerValidate,
      uninvalidating, and avoiding unnecessarily rendering, the
      affected region.  Additionally, if the source buffer also uses a
      GimpTileHandlerValidate, the relevant parts of the source buffer's
      dirty region are copied to the destination's dirty region as well.
    • Ell's avatar
      app: add gimp_tile_handler_validate_unassign() · 12530e21
      Ell authored
      ... which should be used to properly remove a
      GimpTileHandlerValidate from a buffer, instead of using
      gegl_buffer_remove_handler() directly.
      Use gimp_tile_handler_validate_unassign(), instead of
      gegl_buffer_remove_handler(), in gimp_projection_free_buffer().
    • Ell's avatar
      app: in GimpTileHandlerValidate, clear data when allocating tile · e1e4ba9c
      Ell authored
      In GimpTileHandlerValidate, when allocating a new tile upon a
      TILE_GET command, but not rendering the whole tile, clear the tile
      data before rendering, so that the unrendered regions of the tile
      contain zeros, rather than junk.
  4. 02 Aug, 2018 5 commits
  5. 01 Aug, 2018 3 commits
    • Jehan's avatar
      app: add "cairo-ARGB32" to "R'G'B'A u8" in gimp_babl_init_fishes(). · a03e52ea
      Jehan authored
      This fish is used for text layers, so if we let it to be
      lazy-initialized, the first time one writes text in a text layer, it
      generates a few seconds delay, which is really not great.
    • Ell's avatar
      Issue #1884 - Incorrect font when export to png · a826a193
      Ell authored
      In gimp_layer_convert(), avoid converting the drawable type when
      the source and destination color profiles are equal, if otherwise
      unnecessary.  Otherwise, text layers get unnecessarily re-rendered
      during conversion, and, by extension, during image duplication
      (which happens when exporting to any format that requires merging
      down the image).  This may cause the text layer to appear
      differently in the duplicated image, or even use a different font
      if the original font doesn't exist.
    • Ell's avatar
      app: copy the is-color-managed status when duplicating an image · f38443f3
      Ell authored
      When duplicating an image, copy the source image's is-color-managed
      status to the duplicated image, instead of having the duplicated
      image always be color managed.  In particular, do this before
      duplicating the layers, so that we don't convert the duplicated
      layers from sRGB to the image's profile when duplicating an image
      with a non-sRGB profile but with color management turned off.
  6. 31 Jul, 2018 2 commits
  7. 30 Jul, 2018 2 commits
    • ONO Yoshio's avatar
      MR !19: Add support for vertical text writing. · 587d9bbb
      ONO Yoshio authored
      Squashed commit of the following:
      commit ee1ff7d502658cfa1248a13a3f0348495db07eda
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sun Jul 29 00:31:47 2018 +0900
          Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.
      commit d87d012d697628da28fe90199cc04b95b72ba8ef
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sat Jul 28 16:23:10 2018 +0900
          Fix a typo.
      commit cf0238bf7df56c384cdf3b7ec69557d14740f853
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sat Jul 28 15:50:57 2018 +0900
          Fixed seg fault error.
      commit b07f60d0
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Fri Jul 27 17:15:34 2018 +0900
          Add support for vertical text writing.
    • Michael Natterer's avatar
      Issue 1652 - Empty toolbox has very large minimum height in MWM · 46f52813
      Michael Natterer authored
      Adjust size negotiation of GimpToolPalette to take the monitor's
      workarea into account: request space for enough columns so that the
      widget's height is never more than 70% of the workarea height, and
      enough rows so that it's never wider than 90% of the workarea.
  8. 28 Jul, 2018 1 commit
  9. 25 Jul, 2018 4 commits
    • Jehan's avatar
      app: show relevant files only by default. · 6b4b3bad
      Jehan authored
      Just like it was until now, the default filtering should not be all
      files, but only relevant files (i.e. XCF when saving, exportable images
      when exporting and loadable images/XCF when opening).
      Now all files will only be available through the "Show All Files"
      This is simpler than previous implementations where the list was
      proposing "All Files", "All Images" and "All XCF/export images". That is
      just too much.
      With this default, I get the "All Files" checkbox out of the expander so
      that it is visible immediately even when the format list is unexpanded
      (you don't want people to get pissed when not finding how to display all
      their files).
    • Jehan's avatar
      Issue #1160: file dialog view filter getting confused with file... · 63694458
      Jehan authored
      ... format selection.
      Second step: add a "Show All Files" checkbox so that one can still
      prevent view filtering even when forcing a load format.
      This is useful when loading files with unusual extensions, for instance.
    • Jehan's avatar
      app: force the extra widget to take as much place as possible. · 193a49a6
      Jehan authored
      I am separating this from previous commit since it cannot be backported
      to GTK+2.
    • Jehan's avatar
      Issue #1160: file dialog view filter getting confused with file... · 9ae7827f
      Jehan authored
      ... format selection.
      As discussed, the first step is to get rid of the filter list. Our extra
      widget now has both roles of filtering the file list and forcing a
      loading procedure.
  10. 24 Jul, 2018 5 commits
    • Ell's avatar
      */Makefile.am: add *marshal.h files to BUILT_SOURCES · a5102a7d
      Ell authored
      In subdirs containing a generated foomarshal.h header, add the
      generated sources to BUILT_SOURCES, so that they're generated
      before the rest of the source files are built.  Otherwise, since
      there is no rule specifying the dependency between the rest of the
      source files and foomarshal.h, and since foomarshal.h is not
      checked into git (and hence doesn't exist when doing a clean
      build), compilation of the said source files may fail if they're
      built before foomarshal.h is generated.
    • Michael Natterer's avatar
      app: make replacing a drawable's format use almost no undo memory · 248199e9
      Michael Natterer authored
      Add gimp_drawable_set_format() as low-level part of
      gimp_layer_fix_format_space(), and add a special undo type for it that
      only remembers the format and not the entire drawable buffer, because
      all pixels stay the same.
    • Ell's avatar
      app: fix segafult when halting filter-tool with controller · 78abe756
      Ell authored
      In GimpFilterTool, bind the controller's lifetime to the lifetime
      of the config object, rather than to the lifetime of the
      corresponding tool widget; make the controller's widget pointer a
      weak pointer to the widget, and bail out of the controller "set()"
      functions when the widget pointer is NULL.
      This fixes an issue arising when the properties of a config object
      that outlives the widget change after the widget had died,
      triggering a call to the controller's set() function, resulting in
      a segafult when trying to access the widget.
    • Ell's avatar
      app: in prop-GUI, use "direction" UI-meta of angle props for dial · 6976e87d
      Ell authored
      When constructing a prop-GUI widget for an angle property with a
      dial, use the the property's "direction" UI-meta, if exists, to set
      the direction of the dial.  Together with GEGL commit
      7b0578073a0f20334b5a8a8fe57b649d9f302454, this fixes wrong dial
      direction in certain ops that use clockwise angles.
    • Ell's avatar
      app: in GimpDial, add "clockwise-angles" property ... · 0c477564
      Ell authored
      ... and rename "clockwise" to "clockwise-delta"
      Add a boolean "clockwise-angles" property to GimpDial, which, when
      set, causes the dial legs' angles to be measured clockwise, rather
      than counter-clockwise.  The property is FALSE by default.
      Rename the "clockwise" property, which controls the direction of
      the measured delta between the two angles, to "clockwise-delta", to
      avoid confusion, and adapt the rest of the code.
  11. 23 Jul, 2018 2 commits