diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-19 21:28:37 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-19 21:28:37 +0400 |
commit | 579a4a02a54da01a4af98e831f4feb87fba72392 (patch) | |
tree | f76ce8079a2c5495ce40c47aecd8c48cab6a6c7e | |
parent | 2557eaf0dd33e3139cc6188b97029207686360bf (diff) |
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.
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.cpp | 14 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.h | 6 |
2 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 057a749080a..c648f3e6f08 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -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) { diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h index d761ee58cb9..f367298b3d6 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.h +++ b/source/blender/compositor/operations/COM_MaskOperation.h @@ -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 |