Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_MaskOperation.cc
| Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | void MaskOperation::deinitExecution() | ||||
| for (unsigned int i = 0; i < this->m_rasterMaskHandleTot; i++) { | for (unsigned int i = 0; i < this->m_rasterMaskHandleTot; i++) { | ||||
| if (this->m_rasterMaskHandles[i]) { | if (this->m_rasterMaskHandles[i]) { | ||||
| BKE_maskrasterize_handle_free(this->m_rasterMaskHandles[i]); | BKE_maskrasterize_handle_free(this->m_rasterMaskHandles[i]); | ||||
| this->m_rasterMaskHandles[i] = nullptr; | this->m_rasterMaskHandles[i] = nullptr; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void MaskOperation::determineResolution(unsigned int resolution[2], | void MaskOperation::determine_canvas(const rcti &preferred_area, rcti &r_area) | ||||
| unsigned int preferredResolution[2]) | |||||
| { | { | ||||
| if (this->m_maskWidth == 0 || this->m_maskHeight == 0) { | if (this->m_maskWidth == 0 || this->m_maskHeight == 0) { | ||||
| NodeOperation::determineResolution(resolution, preferredResolution); | r_area = COM_AREA_NONE; | ||||
| } | } | ||||
| else { | else { | ||||
| unsigned int nr[2]; | r_area = preferred_area; | ||||
| r_area.xmax = r_area.xmin + m_maskWidth; | |||||
| nr[0] = this->m_maskWidth; | r_area.ymax = r_area.ymin + m_maskHeight; | ||||
| nr[1] = this->m_maskHeight; | |||||
| NodeOperation::determineResolution(resolution, nr); | |||||
| resolution[0] = this->m_maskWidth; | |||||
| resolution[1] = this->m_maskHeight; | |||||
| } | } | ||||
| } | } | ||||
| void MaskOperation::executePixelSampled(float output[4], | void MaskOperation::executePixelSampled(float output[4], | ||||
| float x, | float x, | ||||
| float y, | float y, | ||||
| PixelSampler /*sampler*/) | PixelSampler /*sampler*/) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||