Blender Git Loki

Git Commits -> Revision 41cc9fa

July 30, 2021, 14:55 (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: 41cc9fa9309f4b892fa0c750b0063eed9f01a7f8
Parent Commit: 8d88c7c
Committed By: Fabian Schempp
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021