Fix [#21826] Memory Map growing in size on each render

Image node wasn't properly getting marked to free compbuf data when using premul.
This commit is contained in:
2010-03-31 07:00:59 +00:00
parent 8616d22dc3
commit b3e87146b6

View File

@@ -231,9 +231,12 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b
/*first duplicate stackbuf->rect, since it's just a pointer
to the source imbuf, and we don't want to change that.*/
stackbuf->rect = MEM_dupallocN(stackbuf->rect);
/* since stackbuf now has allocated memory, rather than just a pointer,
* mark it as allocated so it can be freed properly */
stackbuf->malloc=1;
/*premul the image*/
pixel = stackbuf->rect;
for (i=0; i<stackbuf->x*stackbuf->y; i++, pixel += 4) {
pixel[0] *= pixel[3];