1. 14 Nov, 2018 18 commits
    • Jehan's avatar
      app: make line art pre-computation in threads. · a3cda4ab
      Jehan authored
      This makes the speed sensation of the tool much faster as line art can
      be computed in dead time when you start the tool or when you move the
      pointer.
      a3cda4ab
    • Jehan's avatar
      app: compute line art in advance. · f246f404
      Jehan authored
      Right now, this is mostly meaningless as it is still done sequentially.
      But I am mostly preparing the field to pre-compute the line art as
      background thread.
      f246f404
    • Jehan's avatar
      b9de1076
    • Jehan's avatar
      app: fix line art labellization. · 93a49951
      Jehan authored
      The older labelling based off CImg code was broken (probably because of
      me, from my port). Anyway I realized what it was trying to do was too
      generic, which is why we had to fix the result later (labeling all
      non-stroke pixels as 0, etc.). Instead I just implemented a simpler
      labelling and only look for stroke regions. It still over-label a bit
      the painting but a lot less, and is much faster.
      93a49951
    • Jehan's avatar
      app: better use GeglBufferIterator! · c4ff8154
      Jehan authored
      I don't actually need to loop through borders first. This is what the
      abyss policy is for, and I can simply check the iterator position to
      verify I am within buffer boundaries or not.
      This simplifies the code a lot.
      c4ff8154
    • Jehan's avatar
      app: directly update the mask buffer with gegl_node_blit_buffer(). · f02993fb
      Jehan authored
      No need to create a temporary buffer for this.
      f02993fb
    • Jehan's avatar
      app: create a simple priority map for line art selection flooding. · 410c7475
      Jehan authored
      We actually don't need to compute distance map. I just make the simplest
      priority map, with 1 any line art pixel and 0 any other pixel (in mask
      or not), lowest priority being propagated first.
      And let the flooding begin!
      410c7475
    • Jehan's avatar
      app: with recent gegl:watershed-transform, no need for intermediate... · e905ea7b
      Jehan authored
      ... labels buffer.
      We can watershed directly the mask buffer being correctly flagged.
      This commit relies on merge request gegl!8 being accepted and merged.
      e905ea7b
    • Jehan's avatar
      app: use char array for temporary data (rather than a GEGL buffer). · 0c80f8a7
      Jehan authored
      Also use more GeglBufferIterator on input GEGL buffer.
      Using a char array is much less expensive and accelerated the line
      erosion a lot!
      Moving to GeglBufferIterator is not finished, but I do in steps.
      0c80f8a7
    • Jehan's avatar
      app: use simpler allocated variables. · f975f15e
      Jehan authored
      Allocating double-level arrays is just very inefficient.
      f975f15e
    • Jehan's avatar
      f19181dc
    • Jehan's avatar
      app: fix stroke labels in gimp_lineart_estimate_stroke_width(). · 910d7934
      Jehan authored
      I must make sure that stroke pixels are labelled 0 and non-stroke other
      than 0.
      910d7934
    • Jehan's avatar
      app: use more GeglBufferIterator. · 1822ea39
      Jehan authored
      In this case, it makes the code a bit more messy, but hopefully more
      efficient.
      1822ea39
    • Jehan's avatar
    • Jehan's avatar
      fcd038eb
    • Jehan's avatar
      app: implement second step for line art selection/filling. · 8502b4e7
      Jehan authored
      When filling colors in line arts, you don't want to leave space between
      the strokes and the color, which usually happen with any of the current
      selection methods.
      A "KISS" trick is usually to grow your selection a few pixels before
      filling (adding an additional step in colorization process), which
      obviously does not handle all cases (depending on drawing style and
      stroke size, you may need to grow more or less) as it doesn't take into
      account actual stroke geometry.
      
      Instead, I label the selection and the "rest" differently and leave the
      pixel strokes unlabelled. Then I let these unlabelled pixels be flooded
      by the "gegl:watershed-transform" operation.
      Note that this second step is different from the second step from the
      GREYC research paper, as they use their own watershed algorithm taking
      color spots as sources to color the whole image at once. This is a
      different workflow from the one using bucket fill with a single color
      source.
      8502b4e7
    • Jehan's avatar
      app, libgimpbase: add GIMP_SELECT_CRITERION_LINE_ART selection type. · 8ed12b1b
      Jehan authored
      This commit implements part of the research paper "A Fast and Efficient
      Semi-guided Algorithm for Flat Coloring Line-arts" from the GREYC (the
      people from G'Mic). It is meant to select regions from drawn sketchs in
      a "smart" way, in particular it tries to close non-perfectly closed
      regions, which is a common headache for digital painters and colorists.
      
      The implementation is not finished as it needs some watersheding as well
      so that the selected area does not leave "holes" near stroke borders.
      The research paper proposes a new watersheding algorithm, but I may not
      have to implement it, as it is more focused on automatic colorization
      with prepared spots (instead of bucket fill-type interaction).
      
      This will be used in particular with the fuzzy select and bucket fill
      tools.
      
      Note that this first version is a bit slow once we get to big images,
      but I hope to be able to optimize this.
      Also no options from the algorithm are made available in the GUI yet.
      8ed12b1b
    • Alexandre Prokoudine's avatar
      Help menu: various updates · 85e6700a
      Alexandre Prokoudine authored
      Commented out the inactive plug-ins registry: no point linking to a dead page.
      
      Added links to the roadmap page, main wiki page, and the bug tracker. Placed
      the link to the bug tracker one level up from '<Image>/Help/GIMP Online'
      to make it more visible.
      85e6700a
  2. 13 Nov, 2018 1 commit
  3. 12 Nov, 2018 1 commit
  4. 11 Nov, 2018 2 commits
    • Ell's avatar
      configure.ac: escape backslash chars in compiler version string · c0b10753
      Ell authored
      When constructing CC_VERSION, escape backslash characters in the
      compiler version string, so that they don't get interpreted as
      escape sequences by the compiler.  This is especially important on
      Windows, where the version string of MinGW may contain backslash
      characters as part of paths.
      c0b10753
    • Ell's avatar
      Issue #2473 - Transforming a layer doesn't properly transform its mask · 45fc30ca
      Ell authored
      In gimp_drawable_transform_buffer_affine(), avoid modifying the
      clipping mode when transforming layer masks, since this function is
      used (among other things) to transform layer masks together with
      their layer, in which case they should use the same clipping mode
      as the layer.
      
      This fixes a regression introduced by commit
      2ae823ba, causing layer masks to be
      transformed with a mismatched clipping mode during layer
      transforms, leading to discrepencies between the transformed layer
      and the transformed mask.
      
      This commit merely reverts the necessary part of above commit,
      fixing the regression, though note that this code is really up for
      some serious refactoring: the logic for determining which clipping
      mode to use when is spread all over the place.
      45fc30ca
  5. 10 Nov, 2018 4 commits
    • Ell's avatar
      Issue #2470 - Spacing between grid lines does not stay at 1px ... · 658d9f3a
      Ell authored
      ... as I would like it to.
      
      Use GimpSpinButton, added in the previous commit, in GimpSizeEntry,
      instead of GtkSpinButton.  This avoids updating the spin-buttons'
      adjustment values when they lose focus, truncating the value if it
      can't be accurately displayed using the corresponding spin-button's
      digit count.  Since size-entries can have multiple spin-buttons
      using different units, this prevents the value from changing when
      entring a value using one unit, and then shifting the focus to, but
      not changing, another unit.
      658d9f3a
    • Ell's avatar
      libgimpwidgets: add GimpSpinButton · 7ab9ee26
      Ell authored
      GimpSpinButton is a drop-in replacement for (and a subclass of)
      GtkSpinButton.  Unlike GtkSpinButton, it avoids updating the
      adjustment value when losing focus, unless the entry text has
      changed.  This prevents accidental loss of precision, when the
      adjustment value can't be accurately displayed in the entry.
      7ab9ee26
    • Ell's avatar
      tools: in performance-log-viewer.py, fix "function()" predicate ... · 84227fbf
      Ell authored
      ... when not specifying a thread-ID
      84227fbf
    • Ell's avatar
  6. 09 Nov, 2018 1 commit
  7. 08 Nov, 2018 9 commits
  8. 07 Nov, 2018 4 commits
    • Ell's avatar
      app: a few improvements to the GimpBacktrace Linux backend · a29d040d
      Ell authored
      Blacklist the "threaded-ml" thread, which seems to mask the
      backtrace signal.
      
      Improve signal-handler synchronozation, to avoid segfaulting when
      giving up on waiting for all threads to handle the signal.
      Furthermore, when one or more threads fail to handle the signal in
      time, return a GimpBacktrace instance with backtraces for all the
      other threads, and with empty backtraces for all the non-responding
      threads, instead of returning NULL and leaking the allocated
      instance.  Don't blacklist threads that failed to handle the signal
      in time, and instead shorten the wait period for handling the
      signal, and yield execution during waiting to lower the CPU usage.
      a29d040d
    • Ell's avatar
      tools: a few improvements in performance-log-viewer.py · 0b2d4163
      Ell authored
      In sample-search predicates, remove the "exclusive" parameter of
      the "function()" function, and replace it with optional "id" and
      "state" parameters, which limit the match to the call-stacks of
      matching threads, as per the "thread()" function.
      
      Sort the backtrace thread-list by thread ID.
      0b2d4163
    • Ell's avatar
      tools: in performance-log-expand.py, preserve threads with empty stacks · fb95d3b8
      Ell authored
      ... which can be present in logs since last commit.
      fb95d3b8
    • Ell's avatar
      app: a few fixes to performance-log backtrace output · eec1e1f1
      Ell authored
      Fix delta-encoding of performance-log backtraces in certain cases,
      and distinguish between empty call-stacks and removed threads.
      eec1e1f1