#include "render_struct.h"
#include "render_png_struct.h"
#include "render_slices.h"
struct render_slices {
// do I have to free it?
int owned_by_me;
// the induvidual slices
struct render_slice {
// the public info
struct render_slice_info info;
// the render info
struct render render_info;
// our offset into rowbuf
size_t row_offset;
// pointer back to parent
struct render_slices *self;
} slices[RENDER_SLICES_MAX];
// how many slices are in use
size_t num_slices;
// how many slices have reported the current row as done
size_t segments_done;
// the a pointer to the raw memory buffer
unsigned char *rowbuf;
// the two rows of memory area used to a) render b) build the png
unsigned char *rows[2];
// which of the two rows is is used for png-building (default = 0, 1)
int render_row, done_row;
// the png struct
struct render_png png_info;
};
int render_slices_init (struct render_slices *ctx, struct render *render);
void render_slices_deinit (struct render_slices *ctx);