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.
This commit is contained in:
Jeroen Bakker
2012-07-19 17:28:37 +00:00
parent 2557eaf0dd
commit 579a4a02a5
2 changed files with 6 additions and 14 deletions

View File

@@ -30,7 +30,6 @@
#include "DNA_scene_types.h"
#ifdef USE_RASKTER
extern "C" {
@@ -140,13 +139,10 @@ MaskOperation::MaskOperation() : NodeOperation()
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,14 +161,6 @@ void MaskOperation::deinitExecution()
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[])
@@ -193,7 +181,7 @@ void MaskOperation::determineResolution(unsigned int resolution[], unsigned int
}
}
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) {

View File

@@ -72,7 +72,6 @@ public:
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 @@ public:
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