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