1. 02 Sep, 2018 2 commits
    • Ell's avatar
      app: add GimpBacktrace · 80bf686c
      Ell authored
      GimpBacktrace provides an interface for creating and traversing
      multi-threaded backtraces, as well as querying symbol information.
      While we already have some backtrace functionality, it relies on
      external tools for the most part, and as such is rather expensive,
      and is only meant for producing opaque backtraces.  GimpBacktrace,
      on the other hand, is meant to be relatively cheap (we're going to
      use it for profiling,) and allow inspection of the backtrace data.
      In the future, it might make sense to replace some, or all, of the
      other backtrace functions with GimpBacktrace.
      
      GimpBacktrace currently only supports Linux.  By default, it uses
      dladdr() to query symbol information, which is somewhat limited (in
      particular, it doesn't work for static functions.)  When libunwind
      is installed, GimpBacktrace uses it to get more complete symbol
      information.  libunwind is currently an optional dependency, but it
      might make sense to promote it to a mandatory, or opt-out,
      dependency, as it's lightweight and widely available.
      
      On other platforms, the GimpBacktrace interface can still be used,
      but it always returns NULL backtraces.
      80bf686c
    • Ell's avatar
      app: add mnemonics to dashboard action labels · a109a77d
      Ell authored
      a109a77d
  2. 31 Aug, 2018 2 commits
  3. 30 Aug, 2018 2 commits
  4. 28 Aug, 2018 1 commit
    • Ell's avatar
      Issue #2116 - bug: Image guide creation by dragging does not allow ... · 547190fa
      Ell authored
      ... 100% position anymore
      
      In GimpGuideTool, use a closed [0, max_position] range as the
      allowable range for new/repositioned guides (where max_position is
      either the image's width or height), so that guides can be placed
      at the right/bottom edge of the image.
      547190fa
  5. 26 Aug, 2018 1 commit
  6. 25 Aug, 2018 1 commit
    • Ell's avatar
      Issue #2095 - Filter wavelet-decompose error with layer Group option active · e5638451
      Ell authored
      In gimp_image_merge_layers(), explicitly fetch the graph of the top
      layer's parent layer (if exists), to make sure that the top layer's
      graph has a parent node.  We already fetch the image graph, which
      takes care of top-level layers, however, if the top layer is a
      child of an invisible layer group, as is the case in the wavelet-
      decompose plug-in, this is not generally enough to guarantee that
      the group's graph is constructed.
      e5638451
  7. 21 Aug, 2018 1 commit
  8. 20 Aug, 2018 6 commits
    • Ell's avatar
      app: explicitly clear GUI when halting a filter tool · ec80a885
      Ell authored
      In gimp_filter_tool_halt(), explicitly clear the GUI container
      before clearing filter_tool->config, since the tool might be halted
      during the GUI dialog's delete event, in which case the GUI will
      only be implicitly destroyed *after* the function returns.  The
      destruction of the GUI might fire signals whose handlers rely on
      filter_tool->config, so we need to make sure it happens while it's
      still alive.
      
      In particular, this fixes a CRITICAL in the threshold tool, which
      occurs due to the histogram view's "range-changhed" signal being
      fired during its destruction, and its handler accessing
      filter_tool->config.
      ec80a885
    • Ell's avatar
      app: add gimp_gtk_container_clear() · fd64aae4
      Ell authored
      ... which removes all non-internal children of a GtkContainer.
      fd64aae4
    • Michael Natterer's avatar
      app: make GimpDeviceInfo more rubust against broken device listings · 717c183a
      Michael Natterer authored
      gimp_device_info_set_device(): don't just bail out if a device with
      the same name is added again, instead, simply continue and overwrite
      the info's old device with the new one.
      
      NOTE that this only happens if something is wrong on the USB or udev
      or libinput or whatever side and the same device is present multiple
      times. The only "safe" thing is to assume that devices listed earlier
      are dead and dangling entities and that the last registered device is
      the one actually delivering events.
      717c183a
    • Ell's avatar
      app: use adaptive chunk size when rendering projections · a1706bbd
      Ell authored
      In GimpProjection, use an adaptive chunk size when rendering the
      projection asynchronously, rather than using a fixed chunk size.
      The chunk size is determined according to the number of pixels
      processed during the last frame, and the time it took to process
      them, aiming for some target frame-rate (currently, 15 FPS).  In
      other words, the chunks become bigger when processing is fast, and
      smaller when processing is slow.  We're currently aiming for
      generally-square chunks, whose sides are powers of 2, within a
      predefined range.
      
      Note that the chunk size represents a trade off between throughput
      and responsiveness: bigger chunks result in better throughput,
      since each individual chunk incurs an overhead, in particular when
      rendering area filters or multithreaded ops, while smaller chunks
      result in better responsiveness, since the time each chunk
      individual takes to render is smaller, allowing us to more
      accurately meet the target frame rate.  With this commit, we aim to
      find a good compromise dynamically, rather than statically.
      
      The use of adaptive chunk sizes can be disabled by defining the
      environment variable GIMP_NO_ADAPTIVE_CHUNK_SIZE, in which case we
      use a fixed chunk size, as before.
      a1706bbd
    • Ell's avatar
      app: don't chunk update area when rendering projection synchronously · 105ffc78
      Ell authored
      Add a boolean "chunk" parameter to
      gimp_projection_chunk_render_iteration(), which determines whether
      the work area should be sub-divided into chunks prior to rendering
      (previously, the work area would always be sub-divided.)  Only
      pass TRUE when rendering the projection asynchronously, in the
      render callback, and pass FALSE when rendering the projection
      synchronously, in gimp_projection_finish_draw(), which is called
      when flushing the projection through the GimpPickable interface.
      
      Rendering the projection using as big chunks as possible improves
      performance, while worsening responsiveness.  Since responsiveness
      doesn't matter when rendering synchronously, there's no reason to
      render in chunks.
      105ffc78
    • Ell's avatar
      Issue 2052 - Crash when using the flip tool · 94208055
      Ell authored
      In gimp_transform_tool_transform(), use "active_item", instead of
      "tool->drawable", when cutting/pasting the selected portion of a
      layer for transformation.  The latter is a remnant of the old
      transform-tool code, and is not guaranteed to be correspond to the
      correct drawable, or even to a valid drawable (i.e., it can
      potentially produce wrong results, or segfault.)
      94208055
  9. 19 Aug, 2018 6 commits
  10. 18 Aug, 2018 1 commit
  11. 17 Aug, 2018 1 commit
    • Jehan's avatar
      app: allow GUI config property for icon style preference. · 8cfe2df8
      Jehan authored
      A single icon theme can contain both regular and symbolic icons. Let's
      give possibility to switch from one style to the other within GIMP
      Preferences.
      
      This won't work very well in all cases yet, especially if an icon theme
      only has symbolic icons (and no regular ones) because of inconsistencies
      in glib which are being fixed (patches which I submitted and which were
      merged in glib on 2018-08-17).
      So this will work as expected when we will bump our glib requirement to
      whatever is the next release.
      8cfe2df8
  12. 15 Aug, 2018 3 commits
    • Jehan's avatar
      app: reorder function definitions/declarations. · b4f7a90a
      Jehan authored
      Just make so that the declarations and definitions are in the same
      order for easy maintenance.
      
      (cherry picked from commit 91cb86d2)
      b4f7a90a
    • Jehan's avatar
      app: open the Windows console a bit earlier. · d5b0f71b
      Jehan authored
      If we enable the console on Windows, we might as well open it as fast as
      possible, since its purpose is debugging.
      
      (cherry picked from commit c9d76180)
      d5b0f71b
    • Jehan's avatar
      Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit... · 624edf90
      Jehan authored
      ... Windows installation of GIMP.
      
      Our default installer installs 32-bit version of the various DLLs in
      32/bin/ (under the installation prefix). Currently this additional
      folder is simply added in the PATH, so it works most of the time.
      Unfortunately the PATH is searched last for DLLs, and in particular, it
      is searched after system directories. So it means that if any misbehaved
      application is installing DLLs in system dirs (and in particular
      incompatible/older versions of the same DLLs a GIMP plug-in uses), it
      breaks the 32-bit plug-in.
      
      SetDllDirectoryW() bypasses this order and the set folder is searched in
      between the binary directory and the system dirs. We were already
      setting this for our main bin/ directory, which was good for 64-bit
      plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
      run plug-ins check the bitness of the executable before running it, and
      updates the DLL folder accordingly.
      The alternative 32-bit folder can be overridden by the configure option
      --with-win32-32bit-dll-folder (default: 32/bin/). This option can only
      be set when building for 64-bit Windows obviously.
      
      Alternatively we could have put copies of 32-bit DLLs in a subfolder
      with each 32-bit plug-in, but this is at best a terrible workaround, as
      we would duplicate DLLs for every such case. And this would not have
      protected third-party plug-ins which wish to use some of our DLLs.
      Last alternative is to use AddDllDirectory(), but it works since Windows
      7 with a given update only. And our current official support is any
      Windows since Windows 7. So we don't want to use this right now (also
      I'm not sure it would actually be much better than current
      implementation, and it seems to have a bit more limitations than
      SetDllDirectoryW(), though I have not tested).
      
      (cherry picked from commit 91c139f4)
      624edf90
  13. 14 Aug, 2018 1 commit
  14. 12 Aug, 2018 2 commits
    • Jehan's avatar
      app, configure: add a --enable-win32-debug-console build option. · ddeff314
      Jehan authored
      Debugging stable versions under Windows is a pain because we don't have
      access to the standard outputs. The debug console is indeed only built
      on unstable builds. Let's make the debug console a separate build option
      to allow building stable versions for debug (obviously the default
      behavior when not configuring, is same as before, i.e. stable without
      console and unstable with console).
      
      (cherry picked from commit 1a288789)
      ddeff314
    • Jehan's avatar
      configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling. · 8e453330
      Jehan authored
      AM_PATH_GLIB_2_0 m4 macro actually computes this value using
      $PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
      target libraries (not host), hence it would return the executable
      `glib-compile-resources` built for the target.
      
      Also using the same variable name invalidates our test: our own
      AC_PATH_PROG was never run as the variable was already set. And no
      environment variable could override this test anymore either. This is
      why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.
      
      (cherry picked from commit d1d9eb17)
      8e453330
  15. 10 Aug, 2018 3 commits
    • Jehan's avatar
      app: small code cleaning. · ae19441d
      Jehan authored
      Removing unused declaration of icons_set_icon_theme().
      And reorder a bit the declarations to match the definition order.
      ae19441d
    • Ell's avatar
      app: fix group layer drawable update during size change · fc2c640c
      Ell authored
      In gimp_group_layer_update_size(), never suspend drawable updates
      (and, in fact, remove the option to suspend drawable updates
      entirely,) and instead never update the drawable during the call to
      gimp_drawable_set_buffer_full(), and flush the group's projection
      *after* setting the drawable's buffer, so that any pending updates
      will happen after the group's buffer and size are up-to-date.
      
      This fixes some missed drawable updates.
      fc2c640c
    • Ell's avatar
      app: fix projection update-area offset upon buffer allocation/reisizing · 2d63bc6e
      Ell authored
      In GimpProjection, change gimp_projection_add_update_area() to take
      coordinates in the projection's coordinate system, rather than the
      image coordinate system, and move the offset adjustment to the
      projectable invalidation handler.
      
      Modify gimp_projection_projectable_structure_changed() to pass
      projection-space coordinates to gimp_projection_add_update_area().
      
      gimp_projection_get_buffer() and
      gimp_projection_projectable_bounds_changed() already pass
      projection-space coordinates to gimp_projection_add_update_area(),
      which was wrong before, when the projection had a nontrivial
      offset, but is correct now.
      2d63bc6e
  16. 09 Aug, 2018 4 commits
  17. 08 Aug, 2018 1 commit
  18. 07 Aug, 2018 2 commits
    • Michael Natterer's avatar
      Issue #1662 - GIMP crashes while using cage transform when selection is active · 49dfc614
      Michael Natterer authored
      Fixed by implementing Massimo's two findings:
      
      gimp_operation_cage_transform_process(): if aux_buf is NULL, bail out
      after initializing out_buf with identity vectors, fixes the crash.
      
      gimp_cage_tool_create_filter(): set the drawable filter's region to
      GIMP_FILTER_REGION_DRAWABLE, fixes offset when there is a selection.
      49dfc614
    • Jehan's avatar
      app: display extension long description in the details widget. · 549d8808
      Jehan authored
      AppStream spec says it can only contain <p>, <ol> and <ul> markups.
      Unfortunately these are not pango markups (nor is there any equivalent).
      So I just use newlines and spaces until I figure out anything fancier.
      
      That's all still quite ugly, but whatever, I'm still in the start.
      549d8808