Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_ReadBufferOperation.cc
| Show All 30 Lines | ReadBufferOperation::ReadBufferOperation(DataType datatype) | ||||
| flags.is_read_buffer_operation = true; | flags.is_read_buffer_operation = true; | ||||
| } | } | ||||
| void *ReadBufferOperation::initializeTileData(rcti * /*rect*/) | void *ReadBufferOperation::initializeTileData(rcti * /*rect*/) | ||||
| { | { | ||||
| return m_buffer; | return m_buffer; | ||||
| } | } | ||||
| void ReadBufferOperation::determineResolution(unsigned int resolution[2], | void ReadBufferOperation::determine_canvas(const rcti &preferred_area, rcti &r_area) | ||||
| unsigned int preferredResolution[2]) | |||||
| { | { | ||||
| if (this->m_memoryProxy != nullptr) { | if (this->m_memoryProxy != nullptr) { | ||||
| WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation(); | WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation(); | ||||
| operation->determineResolution(resolution, preferredResolution); | operation->determine_canvas(preferred_area, r_area); | ||||
| operation->setResolution(resolution); | operation->set_canvas(r_area); | ||||
| /** \todo may not occur! But does with blur node. */ | /** \todo may not occur! But does with blur node. */ | ||||
| if (this->m_memoryProxy->getExecutor()) { | if (this->m_memoryProxy->getExecutor()) { | ||||
| uint resolution[2] = {static_cast<uint>(BLI_rcti_size_x(&r_area)), | |||||
| static_cast<uint>(BLI_rcti_size_y(&r_area))}; | |||||
| this->m_memoryProxy->getExecutor()->setResolution(resolution); | this->m_memoryProxy->getExecutor()->setResolution(resolution); | ||||
| } | } | ||||
| m_single_value = operation->isSingleValue(); | m_single_value = operation->isSingleValue(); | ||||
| } | } | ||||
| } | } | ||||
| void ReadBufferOperation::executePixelSampled(float output[4], | void ReadBufferOperation::executePixelSampled(float output[4], | ||||
| float x, | float x, | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||