Signature for custom buffer allocation.
typedef BufferFactory = Buffer Function(int width, int height);