1. 08 Mar, 2019 1 commit
  2. 27 Feb, 2019 2 commits
    • Ell's avatar
      Issue #38 - gegl-sampler sometimes crashes for absurd coordinates. · 15a61d51
      Ell authored
      In gegl_sampler_get_ptr(), clamp/wrap the input coordinates based
      on the buffer's abyss and the sampler's context rect, so that the
      coordinates are never farther away from the abyss than necessary,
      avoiding overflowing in gegl_buffer_get() due to extreme coordinate
      values.
      15a61d51
    • Ell's avatar
      buffer: fix incorrect interpoaltion format in linear/cubic samplers box filtering · 535ceb02
      Ell authored
      Add a GeglSampler::interpolate() function, which subclasses should
      implement if they use the generic box-filter algorithm.  This
      function is similar to GeglSampler::get(), except that it always
      performs point sampling (and therefore doesn't take a scale
      matrix), and, in particular, should return its result using the
      sampler's premultiplied interpolation format, rather than its
      output format.
      
      Use interpolate(), instead of get(), in _gegl_sampler_box_get(),
      to avoid erroneously performing box filtering using the sampler's
      output format.
      
      Implement interpolate() in the linear and cubic samplers.
      535ceb02
  3. 22 Feb, 2019 2 commits
  4. 21 Feb, 2019 3 commits
    • Ell's avatar
      operation: fix typo in gegl-operation-private.h · 001b9a88
      Ell authored
      001b9a88
    • Ell's avatar
      operation: don't explicitly prevent caching of point ops · 36c7ebba
      Ell authored
      Don't explicitly set the GeglOperationClass::no_cache field of
      point operations to TRUE, since the AUTO cache policy should
      implictly prevent them from being cached, as point ops don't
      generally implement get_cached_region().
      36c7ebba
    • Ell's avatar
      operation, graph: add {GeglOperationClass,GeglNode}::cache-policy · 7f24430c
      Ell authored
      Caching of operation output is currently controlled by the
      GeglOperationClass::no_cache field on a per-operation-class basis,
      and by the GeglNode::dont-cache property on a per-node basis.
      However, since these fields are boolean, they prevent us from
      automating the decision of whether an op should be cached, or,
      altenatively, they don't provide sufficient control over this
      decision.
      
      Instead, add a ternary GeglCachePolicy enum, which can be one of
      AUTO, NEVER, or ALWAYS, and add a GeglOperationClass::cache_policy
      field, and a GeglNode::cache-policy property, which use this type.
      When the cache-policy property of a node in NEVER or ALWAYS, its
      result isn't/is cached, respectively; when it's AUTO, the deicision
      depends on the operation:  When the cache_policy field of the
      operation class is NEVER or ALWAYS, the result isn't/is cached,
      respectively; when it's AUTO, the result is cached only if the
      operation implements get_cached_region().  Both of these field are
      set to AUTO by default -- the idea is that we generally don't want
      to implicitly cache results, unless they correspond to a different
      region than the ROI.
      
      The existing dont-cache/no_cache fields are deprecated, but are
      still used for now: when GeglNode::cache-policy is AUTO and
      GeglNode::dont-cache is TRUE, the node isn't cached; when
      GeglOperationClass::cache_policy is AUTO and
      GeglOperationClass::no_cache is TRUE, the operation isn't cached.
      
      Like GeglNode::dont-cache, GeglNode::cache-policy is inherited by
      the node's children.
      7f24430c
  5. 18 Feb, 2019 1 commit
  6. 01 Feb, 2019 1 commit
    • Debarshi Ray's avatar
      buffer: Fix handling of the bottom abyss edge for negative co-ordinates · 863272d8
      Debarshi Ray authored
      The bufy value is an offset relative to the beginning of the memory
      buffer. It indicates the number of rows that've already been written
      and the index of the next row. On the other hand, the abyss_y_total
      value is the absolute vertical co-ordinate that lies just beyond the
      bottom edge of the abyss. It's the sum of the top edge and height of
      the abyss. In short, they lie in two different co-ordinate spaces - one
      relative, the other absolute.
      
      Therefore, bufy can only be used with abyss_y_total if the vertical
      co-ordinate of the top edge is used to normalize the spaces.
      
      Consider writing to [(-160,-160) 640x640] that matches the extent and
      abyss of a GeglBuffer with 80x80 tiles. When bufy equals 480 at the
      beginning of the 480th row in the buffer, the target absolute
      co-ordinate in the buffer would be (0, 320) at the top left corner of
      the seventh row of tiles. The abyss_y_total of this buffer is also 480.
      Here, the existing calculation breaks down and the writes get
      truncated.
      
      Fallout from 52e28c10
      
      !15
      863272d8
  7. 29 Jan, 2019 3 commits
  8. 26 Jan, 2019 1 commit
  9. 22 Jan, 2019 1 commit
  10. 20 Jan, 2019 1 commit
  11. 19 Jan, 2019 3 commits
  12. 16 Jan, 2019 1 commit
  13. 13 Jan, 2019 2 commits
  14. 12 Jan, 2019 2 commits
    • Ell's avatar
      buffer: fix last commit · 61ea5fe3
      Ell authored
      :P
      61ea5fe3
    • Ell's avatar
      buffer: add gegl_buffer_{freeze,thaw}_changed() · 413b8bd1
      Ell authored
      Add gegl_buffer_{freeze,thaw}_changed() functions, which block/
      unblock the emission of the buffer's "changed" signal.  While the
      signal is blocked, changes to the buffer are accumulated, and a
      corresponding "changed" signal is emitted once it's unblocked.
      413b8bd1
  15. 11 Jan, 2019 2 commits
  16. 08 Jan, 2019 1 commit
  17. 07 Jan, 2019 1 commit
  18. 06 Jan, 2019 9 commits
  19. 03 Jan, 2019 1 commit
    • Ell's avatar
      buffer: fix race condition when disconnecting cache during trimming · b628f459
      Ell authored
      Since commit 26583900, we no longer
      hold the global cache mutex throughout cache trimming, which
      introduces a race condition when the currently-trimmed cache is
      being disconnected in another thread, since we rely on the global
      cache mutex for serialization.  Fix this, by acquiring the local
      cache tile-storage mutex, in addition to the global cache mutex,
      when disconnecting a cache.
      
      Additionally, use one of the cache's fields to indicate that the
      cache is being disconnected before acquiring any of the mutexes, so
      that the trimming thread can quickly release them in response,
      instead of keeping trimming the cache.
      b628f459
  20. 02 Jan, 2019 2 commits
    • Ell's avatar
      buffer: in GeglBufferIterator, alias compatible sub-iterators · aace10e2
      Ell authored
      In GeglBufferIterator, when several sub-iterators are compatible --
      i.e., they use the same tile storage and format, fully overlap, and
      don't read outside the abyss -- combine their access modes into the
      first sub-iterator, and make the rest aliases for it, using the
      same data buffer, so that we only fetch the tile, or read/write the
      data, once per iteration.
      aace10e2
    • Ell's avatar
      buffer: in GeglBufferIterator, avoid discarding tile data if aliased · bd7a1f58
      Ell authored
      In GeglBufferIterator, avoid discarding tile data through write-
      only sub-iterators accessing the entire tile, if another sub-
      iterator reads the same tile, during the same iteration.
      bd7a1f58