[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49069] trunk/blender/source/blender/ compositor/operations: Possible fix for [#32141] Crash when using a mask as the factor input

Jeroen Bakker j.bakker at atmind.nl
Thu Jul 19 19:28:37 CEST 2012


Revision: 49069
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49069
Author:   jbakker
Date:     2012-07-19 17:28:37 +0000 (Thu, 19 Jul 2012)
Log Message:
-----------
Possible fix for [#32141] Crash when using a mask as the factor input
for a color combine (mix) node with render resolution at 100%

Seems to be that the MaskNode has been created as a complex node. But no
complex features were used. Converted the execute pixel to simple
execution. And it sees that the crash does not happen.

Not sure if it is the issue is solved. I am going to let the user retest
with this revision.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_MaskOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_MaskOperation.h

Modified: trunk/blender/source/blender/compositor/operations/COM_MaskOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MaskOperation.cpp	2012-07-19 13:07:33 UTC (rev 49068)
+++ trunk/blender/source/blender/compositor/operations/COM_MaskOperation.cpp	2012-07-19 17:28:37 UTC (rev 49069)
@@ -30,7 +30,6 @@
 
 #include "DNA_scene_types.h"
 
-
 #ifdef USE_RASKTER
 
 extern "C" {
@@ -140,13 +139,10 @@
 	this->m_maskHeight = 0;
 	this->m_framenumber = 0;
 	this->m_rasterMaskHandle = NULL;
-	setComplex(true);
 }
 
 void MaskOperation::initExecution()
 {
-	initMutex();
-
 	if (this->m_mask) {
 		if (this->m_rasterMaskHandle == NULL) {
 			const int width = this->getWidth();
@@ -165,16 +161,8 @@
 		BKE_maskrasterize_handle_free(this->m_rasterMaskHandle);
 		this->m_rasterMaskHandle = NULL;
 	}
-
-	deinitMutex();
 }
 
-void *MaskOperation::initializeTileData(rcti *rect)
-{
-	/* pass */
-	return NULL;
-}
-
 void MaskOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
 {
 	if (this->m_maskWidth == 0 || this->m_maskHeight == 0) {
@@ -193,7 +181,7 @@
 	}
 }
 
-void MaskOperation::executePixel(float *color, int x, int y, void *data)
+void MaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
 {
 	const float xy[2] = {x / (float)this->m_maskWidth, y / (float)this->m_maskHeight};
 	if (this->m_rasterMaskHandle) {

Modified: trunk/blender/source/blender/compositor/operations/COM_MaskOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MaskOperation.h	2012-07-19 13:07:33 UTC (rev 49068)
+++ trunk/blender/source/blender/compositor/operations/COM_MaskOperation.h	2012-07-19 17:28:37 UTC (rev 49069)
@@ -72,7 +72,6 @@
 	void initExecution();
 	void deinitExecution();
 
-	void *initializeTileData(rcti *rect);
 
 	void setMask(Mask *mask) { this->m_mask = mask; }
 	void setMaskWidth(int width) { this->m_maskWidth = width; }
@@ -81,7 +80,12 @@
 	void setSmooth(bool smooth) { this->m_do_smooth = smooth; }
 	void setFeather(bool feather) { this->m_do_feather = feather; }
 
+#ifdef USE_RASKTER
+	void *initializeTileData(rcti *rect);
 	void executePixel(float *color, int x, int y, void *data);
+#else /* USE_RASKTER */
+	void executePixel(float *color, float x, float y, PixelSampler sampler);
+#endif /* USE_RASKTER */
 };
 
 #endif




More information about the Bf-blender-cvs mailing list