[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27891] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_image.c: Fix [#21826] Memory Map growing in size on each render
Matt Ebb
matt at mke3.net
Wed Mar 31 09:00:59 CEST 2010
Revision: 27891
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27891
Author: broken
Date: 2010-03-31 09:00:59 +0200 (Wed, 31 Mar 2010)
Log Message:
-----------
Fix [#21826] Memory Map growing in size on each render
Image node wasn't properly getting marked to free compbuf data when using premul.
Modified Paths:
--------------
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-03-31 06:52:31 UTC (rev 27890)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-03-31 07:00:59 UTC (rev 27891)
@@ -231,9 +231,12 @@
/*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];
More information about the Bf-blender-cvs
mailing list