• Ell's avatar
    buffer: don't use cached sampler for gegl_buffer_sample[_at_level]() · 26f13cbf
    Ell authored
    The use of a per-buffer cached sampler is problematic, especially
    since the cached sampler may cache stale data after the buffer is
    modified.  Avoiding this requires careful use of
    gegl_buffer_sample_cleanup().  On the one hand, when using
    gegl_buffer_sample[_at_level]() for one-off samples in loosely-
    coupled code, this effectively means calling
    gegl_buffer_sample_cleanup() before/after each sample, defeating
    the purpose of caching the sampler in the first place.  On the
    other hand, when performing multiple samples in performance-
    critical code, using a sampler object is much more efficient
    anyway.
    
    Remove the per-buffer cached sampler, and simply use a per-call
    temporary sampler in gegl_buffer_sample[_at_level]().  Advise users
    to use gegl_buffer_sampler_new[_at_level]() to create a sampler
    object instead when performance is a concern.
    
    Deprecate gegl_buffer_sample_cleanup(), which is not necessary
    anymore, and keep it as a NOP for now.
    26f13cbf
Name
Last commit
Last update
..
buffer Loading commit data...
graph Loading commit data...
module Loading commit data...
opencl Loading commit data...
operation Loading commit data...
process Loading commit data...
property-types Loading commit data...
.gitignore Loading commit data...
Gegl.metadata.in Loading commit data...
Makefile.am Loading commit data...
gegl-algorithms-2x2-downscale.inc Loading commit data...
gegl-algorithms-bilinear.inc Loading commit data...
gegl-algorithms-boxfilter.inc Loading commit data...
gegl-algorithms.c Loading commit data...
gegl-algorithms.h Loading commit data...
gegl-apply.c Loading commit data...
gegl-apply.h Loading commit data...
gegl-config.c Loading commit data...
gegl-config.h Loading commit data...
gegl-cpuaccel-private.h Loading commit data...
gegl-cpuaccel.c Loading commit data...
gegl-cpuaccel.h Loading commit data...
gegl-debug.h Loading commit data...
gegl-dot-visitor.c Loading commit data...
gegl-dot-visitor.h Loading commit data...
gegl-dot.c Loading commit data...
gegl-dot.h Loading commit data...
gegl-enums.c Loading commit data...
gegl-enums.h Loading commit data...
gegl-gio-private.h Loading commit data...
gegl-gio.c Loading commit data...
gegl-init-private.h Loading commit data...
gegl-init.c Loading commit data...
gegl-init.h Loading commit data...
gegl-instrument.c Loading commit data...
gegl-instrument.h Loading commit data...
gegl-introspection-support.c Loading commit data...
gegl-introspection-support.h Loading commit data...
gegl-lookup.c Loading commit data...
gegl-lookup.h Loading commit data...
gegl-matrix.c Loading commit data...
gegl-matrix.h Loading commit data...
gegl-module.h Loading commit data...
gegl-op.h Loading commit data...
gegl-operations-util.h Loading commit data...
gegl-plugin.h Loading commit data...
gegl-random-private.h Loading commit data...
gegl-random.c Loading commit data...
gegl-random.h Loading commit data...
gegl-serialize.c Loading commit data...
gegl-stats.c Loading commit data...
gegl-stats.h Loading commit data...
gegl-types-internal.h Loading commit data...
gegl-types.h Loading commit data...
gegl-utils.c Loading commit data...
gegl-utils.h Loading commit data...
gegl-version.h.in Loading commit data...
gegl-xml.c Loading commit data...
gegl-xml.h Loading commit data...
gegl.deps.in Loading commit data...
gegl.h Loading commit data...