1. 10 Jun, 2020 1 commit
  2. 07 Jun, 2020 1 commit
    • Niels De Graef's avatar
      Use NULL c_handler for "simple" GObject signals · 3cffc84f
      Niels De Graef authored
      Apart from being less code, this actually gives us a nice performance
      improvement. Up until a few years ago, if you pass `NULL` as the
      marshaller for a signal, GLib would fall back to
      `g_cclosure_marshal_generic` which uses libffi to pack/unpack its
      arguments. One could avoid this by specifying a more specific
      marshaller which would then be used to immediately pack and unpack into
      GValues with the correct type.
      
      Lately however, as a way of optimizing signal emission (which can be
      quite expensive), GLib added a possibility to set a va_marshaller, which
      skips the unnecessary GValue packing and unpacking and just uses a
      valist variant.
      
      Since the performance difference is big enough, if the marshaller
      argument is NULL, `g_signal_new()` will now check for the simple
      marshallers (return type NONE and a single argument) and set both the
      generic and the valist marshaller. In other words, less code for us with
      bigger optimizations.
      
      In case you also want va_marshallers for more complex signals, you can
      use `g_signal_set_va_marshaller()`.
      3cffc84f
  3. 24 May, 2020 2 commits
  4. 23 May, 2020 1 commit
  5. 13 May, 2020 2 commits
  6. 11 May, 2020 1 commit
    • Øyvind "pippin" Kolås's avatar
      buffer: tune cubic coefficients away from anomaly · c6b3632d
      Øyvind "pippin" Kolås authored
      As reported in issue #167, the current coefficients of the cubic
      resampler causes a sinuosidal grid anomaly when rotating some noise
      patterns, to work around this we bring the sharpness/smoothness
      trade-off for the cubic half way back to smooth which also
      significantly reduces the strength of the anomaly.
      
      The code for choosing behavior of the cubic resampler by choosing
      cubic types via string never worked, as the strcmp were the inverse
      of what they should have been. This commit reduces it to only rely
      on computing the coefficent from the formula, and adds comments
      what the different constants we have used mean.
      c6b3632d
  7. 06 May, 2020 6 commits
    • Ell's avatar
      buffer: in cache handler and swap backend, use g_hash_table_add() ... · 1ad6d536
      Ell authored
      ... instead of g_hash_table_insert()
      1ad6d536
    • Ell's avatar
      buffer: in swap backend, improve empty tile storage · 96381633
      Ell authored
      96381633
    • Ell's avatar
      buffer: misc cleanup in gegl-tile-backend-swap.c · 72bfba85
      Ell authored
      72bfba85
    • Ell's avatar
      buffer: handle uninitialized buffers in gegl_buffer_clear() · 31649e05
      Ell authored
      When calling gegl_buffer_clear() on an uninitialized buffer, fill
      tile-aligned regions with explicitly-created empty tiles, instead
      of voiding the region and relying on the tiles to be created on-
      demand, so that the region is zero-initialized, instead of
      uninitialized.
      31649e05
    • Ell's avatar
      buffer: allow creating buffers with uninitialized data · 49d0b414
      Ell authored
      Add a new construct-only GeglBuffer::initlalized boolean property,
      which, when FALSE, allows the buffer to avoid zero-initializing
      empty tiles.  This property defaults to TRUE, and is mostly meant
      to be used internally for now.
      
      When set to TRUE, empty tiles are created fully damaged, so that
      their data is not unnecessarily initialized when uncloned.  Note
      that we already avoid initializing or copying uncloned tile data
      when overwriting the full tile content, but this allows us to avoid
      initialization even when writing partial content.
      
      This optimization is currently limited to level-0 tiles, to
      simplify the code.
      49d0b414
    • Ell's avatar
      buffer: track empty tiles in the swap backend · bb3afed5
      Ell authored
      In GeglTileBackendSwap, track stored empty tiles on TILE_SET, and
      return corresponding empty tiles on TILE_GET.  We'd previously
      ignore empty tiles on TILE_SET, and rely on GeglTileHandlerEmpty to
      recreate them on TILE_GET.
      
      This allows us to properly store empty tiles in the swap for
      buffers with custom tile handlers, that may return non-empty tiles
      when there's no existing underlying tile.  More importantly, it
      allows us to introduce buffers with uninitialized data, while still
      being able to properly store explicitly-created empty tiles.
      
      Note that empty tiles don't consume any disk space, and only impose
      bookkeeping overhead.
      bb3afed5
  8. 01 May, 2020 3 commits
  9. 28 Apr, 2020 1 commit
  10. 26 Apr, 2020 2 commits
    • Ell's avatar
      buffer: in gegl-tile-alloc, keep a spare empty block · 54d1ef72
      Ell authored
      In gegl-tile-alloc, when all tiles in a block are freed, keep a
      single empty block around at any given time as a spare, and reuse
      the block when a new one is required.  This avoids frequent block
      allocation and freeing when a single (or few) tiles on the edge of
      a block are repeadtedly allocated/freed.
      54d1ef72
    • Ell's avatar
      buffer: allow disabling tile allocator through GEGL_TILE_ALLOC env var · bd4caaca
      Ell authored
      In gegl-tile-alloc, allow disabling the tile allocator, and using
      plaing gegl_malloc() for tiles instead, by setting the
      GEGL_TILE_ALLOC environment variable to 0.  This is useful for
      troubleshooting.
      bd4caaca
  11. 24 Mar, 2020 1 commit
  12. 15 Mar, 2020 3 commits
  13. 20 Feb, 2020 1 commit
    • Ell's avatar
      buffer: add gegl_buffer_share_storage() · 337eab20
      Ell authored
      ... which checks if a pair of buffers share the same underlying
      tile storage.  This can be used, e.g., for certain optimizations,
      as will be done in GIMP.
      337eab20
  14. 09 Jan, 2020 1 commit
    • Ell's avatar
      buffer: in swap backend, only compress current tile when stalling · bb394b04
      Ell authored
      In the swap backend, when attempting to push a tile to a full
      queue, only compress the current tile before waiting for free queue
      space, instead of searching the rest of the queue for additional
      tiles to compress.  When the queue is very long, the recurring
      linear search itself can end up taking a significant amount of
      time, during which the queue must be locked, blocking both other
      threads attempting to push a tile simultaneously, as well as the
      swap-writer thread attempting to free queue space.
      
      This partially reverts commit
      16d65b5d.
      bb394b04
  15. 30 Nov, 2019 1 commit
  16. 18 Nov, 2019 1 commit
  17. 17 Nov, 2019 1 commit
  18. 22 Oct, 2019 3 commits
  19. 11 Sep, 2019 1 commit
  20. 10 Sep, 2019 1 commit
    • Ell's avatar
      buffer: use binary tree for gap list in the swap backend · 817dd391
      Ell authored
      In GeglTileBackendSwap, use a binary tree (sorted by gap offset)
      combined with a singly-linked list for storing the swap-file gap
      list.  While we still use a linear search for finding a large-
      enough gap when allocating space for a new tile, this allows us to
      use an O (log n) search, instead of a linear search, for the two
      adjacent gaps when removing a tile, significantly improving tile-
      removal speed.
      817dd391
  21. 05 Sep, 2019 1 commit
    • Ell's avatar
      buffer, operations: in gegl_buffer_create_sub_buffer(), don't alias input · d36ec695
      Ell authored
      In gegl_buffer_create_sub_buffer(), always return a new buffer
      object, even when the requested extent is equal to the input
      extent, instead of just reffing the input buffer in this case.
      This makes sure that (non-content-related) changes to the original
      buffer don't affect the sub-buffer.
      
      Adapt operations that use gegl_buffer_create_sub_buffer(), and for
      which this distinction is irrelevant, to explicitly ref the
      origianl buffer when the bounds are equal, instead of creating a
      sub-buffer.
      d36ec695
  22. 22 Aug, 2019 1 commit
    • Salamandar's avatar
      Cleanup after meson port. · b3224d5b
      Salamandar authored
      * As the build is always out-of-source, we don't need gitignores
        everywhere. I added sane defaults in the top-level gitignore.
      
      * Remove auto-generated sources (*.cl.h) as they are *not* used at build
        time (the ones in the build directory are)
      b3224d5b
  23. 16 Aug, 2019 1 commit
    • Øyvind "pippin" Kolås's avatar
      remove autotools · 6b012660
      Øyvind "pippin" Kolås authored
      Having two build systems works when verifying that the new one can take over -
      but the overhead of keeping two systems working is large - and makes it
      complicated for contributors. Getting rid of autotools also allows us to
      continue refactoring away file names and directory layout away from constraints
      from autotools.
      6b012660
  24. 13 Aug, 2019 1 commit
    • Øyvind "pippin" Kolås's avatar
      Meson port - integrating merge request !35 · 9a89095f
      Øyvind "pippin" Kolås authored
      This commit contains the meson build system changes from is a combination
      of commits from that branch, with most of the meson port done by
      Félix Piédallu - with some adaptations to sources and build by Øyvind Kolås.
      
      We need a transition phase where meson works on top of autotools to
      switch many of the CI systems gegl is involved in over to meson.
      
      Among the commits squashed into this one are:
      
      Author: Félix Piédallu <felix@piedallu.me>
          Remove check for py2
          post-merge
          build: add gegl-npd-lib to pkgconfig
          Added meson files
          [src] move libnsgif to subdir
          [src] Compatibility with Meson: libs/ -> subprojects/
      
      Author: Øyvind Kolås <pippin@gimp.org>
          tools: exp_combine fix signedness warning
          gegl: fix Babl gir name
          meson: do not builds docs and workshop by default
          bin/meson: link binary with gio
          operations/meson: add missing operations
          meson: skip opencl tests, opt all other tests out of parallel running
          put all genrated webcontent in one folder
          docs/meson: build of ops examples/html
          tools: skip searching for source path for ops, adapt for meson
          docs: make asciidoc part of build work with meson, using bits from nielsdg's meson branch
          bin:meson add lua deps
          meson: check for luajit instead of lua
          meson: generate gtk-doc
          meson: drop graphviz checking
          gegl: add back GEGL_MAJOR_VERSION etc in gegl-version.h
          build: add check for malloc_trim
      9a89095f
  25. 07 Aug, 2019 2 commits