Blender Git Commit Log

Git Commits -> Revision 45b46e5

Revision 45b46e5 by Manuel Castilla (master)
July 19, 2021, 18:06 (GMT)
Compositor: Buffer iterators

Currently we mostly iterate buffer areas using x/y loops or through
utility methods extending from base classes.

To simplify code in simple operations this commit adds wrappers for
specifying buffer areas and their iterators for raw buffers with any
element stride:
- BufferRange: Specifies a range of contiguous buffer elements from a
given element index.
- BufferRangeIterator: Iterates elements in a BufferRange.
- BufferArea: Specifies a rectangle area of elements in a 2D buffer.
- BufferAreaIterator: Iterates elements in a BufferArea.
- BuffersIterator: Simultaneously iterates an area of elements in an
output buffer and any number of input buffers.
- BuffersIteratorBuilder: Helper for building BuffersIterator adding
buffers one by one.
For iterating areas coordinates it adds `XRange` and `YRange` methods
that return `IndexRange`.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D11882

Commit Details:

Full Hash: 45b46e5de9fbfb4985d81ac43cf61a6dcb339ff7
Parent Commit: 582c553
Lines Changed: +602, -0

3 Added Paths:

/source/blender/compositor/intern/COM_BufferArea.h (+198, -0) (View)
/source/blender/compositor/intern/COM_BufferRange.h (+171, -0) (View)
/source/blender/compositor/intern/COM_BuffersIterator.h (+164, -0) (View)

4 Modified Paths:

/source/blender/compositor/CMakeLists.txt (+3, -0) (Diff)
/source/blender/compositor/COM_defines.h (+23, -0) (Diff)
/source/blender/compositor/intern/COM_MemoryBuffer.cc (+14, -0) (Diff)
/source/blender/compositor/intern/COM_MemoryBuffer.h (+29, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021