Cleanup: Replace is...Operation() methods with a flag.
This commit is contained in:
@@ -135,13 +135,13 @@ int DebugInfo::graphviz_operation(const ExecutionSystem *system,
|
|||||||
else if (operation->isOutputOperation(system->getContext().isRendering())) {
|
else if (operation->isOutputOperation(system->getContext().isRendering())) {
|
||||||
fillcolor = "dodgerblue1";
|
fillcolor = "dodgerblue1";
|
||||||
}
|
}
|
||||||
else if (operation->isSetOperation()) {
|
else if (operation->get_flags().is_set_operation()) {
|
||||||
fillcolor = "khaki1";
|
fillcolor = "khaki1";
|
||||||
}
|
}
|
||||||
else if (operation->isReadBufferOperation()) {
|
else if (operation->get_flags().is_read_buffer_operation) {
|
||||||
fillcolor = "darkolivegreen3";
|
fillcolor = "darkolivegreen3";
|
||||||
}
|
}
|
||||||
else if (operation->isWriteBufferOperation()) {
|
else if (operation->get_flags().is_write_buffer_operation) {
|
||||||
fillcolor = "darkorange";
|
fillcolor = "darkorange";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ bool DebugInfo::graphviz_system(const ExecutionSystem *system, char *str, int ma
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (NodeOperation *operation : system->m_operations) {
|
for (NodeOperation *operation : system->m_operations) {
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *read = (ReadBufferOperation *)operation;
|
ReadBufferOperation *read = (ReadBufferOperation *)operation;
|
||||||
WriteBufferOperation *write = read->getMemoryProxy()->getWriteBufferOperation();
|
WriteBufferOperation *write = read->getMemoryProxy()->getWriteBufferOperation();
|
||||||
std::vector<std::string> &read_groups = op_groups[read];
|
std::vector<std::string> &read_groups = op_groups[read];
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ ExecutionGroup::ExecutionGroup()
|
|||||||
this->m_x_chunks_len = 0;
|
this->m_x_chunks_len = 0;
|
||||||
this->m_y_chunks_len = 0;
|
this->m_y_chunks_len = 0;
|
||||||
this->m_chunks_len = 0;
|
this->m_chunks_len = 0;
|
||||||
this->m_initialized = false;
|
|
||||||
this->m_chunks_finished = 0;
|
this->m_chunks_finished = 0;
|
||||||
BLI_rcti_init(&this->m_viewerBorder, 0, 0, 0, 0);
|
BLI_rcti_init(&this->m_viewerBorder, 0, 0, 0, 0);
|
||||||
this->m_executionStartTime = 0;
|
this->m_executionStartTime = 0;
|
||||||
@@ -70,17 +69,17 @@ CompositorPriority ExecutionGroup::getRenderPriority()
|
|||||||
|
|
||||||
bool ExecutionGroup::can_contain(NodeOperation &operation)
|
bool ExecutionGroup::can_contain(NodeOperation &operation)
|
||||||
{
|
{
|
||||||
if (!this->m_initialized) {
|
if (!m_flags.initialized) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operation.isReadBufferOperation()) {
|
if (operation.get_flags().is_read_buffer_operation) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (operation.isWriteBufferOperation()) {
|
if (operation.get_flags().is_write_buffer_operation) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (operation.isSetOperation()) {
|
if (operation.get_flags().is_set_operation) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,11 +102,12 @@ bool ExecutionGroup::addOperation(NodeOperation *operation)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!operation->isReadBufferOperation() && !operation->isWriteBufferOperation()) {
|
if (!operation->get_flags().is_read_buffer_operation &&
|
||||||
|
!operation->get_flags().is_write_buffer_operation) {
|
||||||
m_flags.complex = operation->get_flags().complex;
|
m_flags.complex = operation->get_flags().complex;
|
||||||
m_flags.open_cl = operation->get_flags().open_cl;
|
m_flags.open_cl = operation->get_flags().open_cl;
|
||||||
m_flags.single_threaded = operation->isSingleThreaded();
|
m_flags.single_threaded = operation->isSingleThreaded();
|
||||||
m_initialized = true;
|
m_flags.initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_operations.append(operation);
|
m_operations.append(operation);
|
||||||
@@ -134,7 +134,7 @@ void ExecutionGroup::initExecution()
|
|||||||
unsigned int max_offset = 0;
|
unsigned int max_offset = 0;
|
||||||
|
|
||||||
for (NodeOperation *operation : m_operations) {
|
for (NodeOperation *operation : m_operations) {
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
|
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
|
||||||
this->m_read_operations.append(readOperation);
|
this->m_read_operations.append(readOperation);
|
||||||
max_offset = MAX2(max_offset, readOperation->getOffset());
|
max_offset = MAX2(max_offset, readOperation->getOffset());
|
||||||
@@ -453,7 +453,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(rcti &rect)
|
|||||||
{
|
{
|
||||||
// we assume that this method is only called from complex execution groups.
|
// we assume that this method is only called from complex execution groups.
|
||||||
NodeOperation *operation = this->getOutputOperation();
|
NodeOperation *operation = this->getOutputOperation();
|
||||||
if (operation->isWriteBufferOperation()) {
|
if (operation->get_flags().is_write_buffer_operation) {
|
||||||
WriteBufferOperation *writeOperation = (WriteBufferOperation *)operation;
|
WriteBufferOperation *writeOperation = (WriteBufferOperation *)operation;
|
||||||
MemoryBuffer *buffer = new MemoryBuffer(
|
MemoryBuffer *buffer = new MemoryBuffer(
|
||||||
writeOperation->getMemoryProxy(), rect, MemoryBufferState::Temporary);
|
writeOperation->getMemoryProxy(), rect, MemoryBufferState::Temporary);
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ enum class eChunkExecutionState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ExecutionGroupFlags {
|
struct ExecutionGroupFlags {
|
||||||
|
bool initialized : 1;
|
||||||
/**
|
/**
|
||||||
* Is this ExecutionGroup an output ExecutionGroup
|
* Is this ExecutionGroup an output ExecutionGroup
|
||||||
* An OutputExecution group are groups containing a
|
* An OutputExecution group are groups containing a
|
||||||
@@ -82,6 +83,7 @@ struct ExecutionGroupFlags {
|
|||||||
|
|
||||||
ExecutionGroupFlags()
|
ExecutionGroupFlags()
|
||||||
{
|
{
|
||||||
|
initialized = false;
|
||||||
is_output = false;
|
is_output = false;
|
||||||
complex = false;
|
complex = false;
|
||||||
open_cl = false;
|
open_cl = false;
|
||||||
@@ -168,18 +170,6 @@ class ExecutionGroup {
|
|||||||
*/
|
*/
|
||||||
blender::Vector<eChunkExecutionState> m_chunk_execution_states;
|
blender::Vector<eChunkExecutionState> m_chunk_execution_states;
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief indicator when this ExecutionGroup has valid Operations in its vector for Execution
|
|
||||||
* \note When building the ExecutionGroup Operations are added via recursion.
|
|
||||||
* First a WriteBufferOperations is added, then the.
|
|
||||||
* \note Operation containing the settings that is important for the ExecutiongGroup is added,
|
|
||||||
* \note When this occurs, these settings are copied over from the node to the ExecutionGroup
|
|
||||||
* \note and the Initialized flag is set to true.
|
|
||||||
* \see complex
|
|
||||||
* \see openCL
|
|
||||||
*/
|
|
||||||
bool m_initialized;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief denotes boundary for border compositing
|
* \brief denotes boundary for border compositing
|
||||||
* \note measured in pixel space
|
* \note measured in pixel space
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ static void update_read_buffer_offset(blender::Vector<NodeOperation *> &operatio
|
|||||||
{
|
{
|
||||||
unsigned int order = 0;
|
unsigned int order = 0;
|
||||||
for (NodeOperation *operation : operations) {
|
for (NodeOperation *operation : operations) {
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
||||||
readOperation->setOffset(order);
|
readOperation->setOffset(order);
|
||||||
order++;
|
order++;
|
||||||
@@ -142,7 +142,7 @@ static void init_write_operations_for_execution(blender::Vector<NodeOperation *>
|
|||||||
const bNodeTree *bTree)
|
const bNodeTree *bTree)
|
||||||
{
|
{
|
||||||
for (NodeOperation *operation : operations) {
|
for (NodeOperation *operation : operations) {
|
||||||
if (operation->isWriteBufferOperation()) {
|
if (operation->get_flags().is_write_buffer_operation) {
|
||||||
operation->setbNodeTree(bTree);
|
operation->setbNodeTree(bTree);
|
||||||
operation->initExecution();
|
operation->initExecution();
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ static void init_write_operations_for_execution(blender::Vector<NodeOperation *>
|
|||||||
static void link_write_buffers(blender::Vector<NodeOperation *> &operations)
|
static void link_write_buffers(blender::Vector<NodeOperation *> &operations)
|
||||||
{
|
{
|
||||||
for (NodeOperation *operation : operations) {
|
for (NodeOperation *operation : operations) {
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
|
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
|
||||||
readOperation->updateMemoryBuffer();
|
readOperation->updateMemoryBuffer();
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ static void init_non_write_operations_for_execution(blender::Vector<NodeOperatio
|
|||||||
const bNodeTree *bTree)
|
const bNodeTree *bTree)
|
||||||
{
|
{
|
||||||
for (NodeOperation *operation : operations) {
|
for (NodeOperation *operation : operations) {
|
||||||
if (!operation->isWriteBufferOperation()) {
|
if (!operation->get_flags().is_write_buffer_operation) {
|
||||||
operation->setbNodeTree(bTree);
|
operation->setbNodeTree(bTree);
|
||||||
operation->initExecution();
|
operation->initExecution();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,6 +204,13 @@ struct NodeOperationFlags {
|
|||||||
*/
|
*/
|
||||||
bool is_resolution_set : 1;
|
bool is_resolution_set : 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is this a set operation (value, color, vector).
|
||||||
|
*/
|
||||||
|
bool is_set_operation : 1;
|
||||||
|
bool is_write_buffer_operation : 1;
|
||||||
|
bool is_read_buffer_operation : 1;
|
||||||
|
|
||||||
NodeOperationFlags()
|
NodeOperationFlags()
|
||||||
{
|
{
|
||||||
complex = false;
|
complex = false;
|
||||||
@@ -211,6 +218,9 @@ struct NodeOperationFlags {
|
|||||||
use_render_border = false;
|
use_render_border = false;
|
||||||
use_viewer_border = false;
|
use_viewer_border = false;
|
||||||
is_resolution_set = false;
|
is_resolution_set = false;
|
||||||
|
is_set_operation = false;
|
||||||
|
is_read_buffer_operation = false;
|
||||||
|
is_write_buffer_operation = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -301,11 +311,11 @@ class NodeOperation {
|
|||||||
unsigned int preferredResolution[2]);
|
unsigned int preferredResolution[2]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief isOutputOperation determines whether this operation is an output of the ExecutionSystem
|
* \brief isOutputOperation determines whether this operation is an output of the
|
||||||
* during rendering or editing.
|
* ExecutionSystem during rendering or editing.
|
||||||
*
|
*
|
||||||
* Default behavior if not overridden, this operation will not be evaluated as being an output of
|
* Default behavior if not overridden, this operation will not be evaluated as being an output
|
||||||
* the ExecutionSystem.
|
* of the ExecutionSystem.
|
||||||
*
|
*
|
||||||
* \see ExecutionSystem
|
* \see ExecutionSystem
|
||||||
* \ingroup check
|
* \ingroup check
|
||||||
@@ -400,31 +410,6 @@ class NodeOperation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isSetOperation() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief is this operation of type ReadBufferOperation
|
|
||||||
* \return [true:false]
|
|
||||||
* \see ReadBufferOperation
|
|
||||||
*/
|
|
||||||
virtual bool isReadBufferOperation() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief is this operation of type WriteBufferOperation
|
|
||||||
* \return [true:false]
|
|
||||||
* \see WriteBufferOperation
|
|
||||||
*/
|
|
||||||
virtual bool isWriteBufferOperation() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief is this operation the active viewer output
|
* \brief is this operation the active viewer output
|
||||||
* user can select an ViewerNode to be active
|
* user can select an ViewerNode to be active
|
||||||
@@ -442,8 +427,8 @@ class NodeOperation {
|
|||||||
rcti *output);
|
rcti *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief set the index of the input socket that will determine the resolution of this operation
|
* \brief set the index of the input socket that will determine the resolution of this
|
||||||
* \param index: the index to set
|
* operation \param index: the index to set
|
||||||
*/
|
*/
|
||||||
void setResolutionInputSocketIndex(unsigned int index);
|
void setResolutionInputSocketIndex(unsigned int index);
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ WriteBufferOperation *NodeOperationBuilder::find_attached_write_buffer_operation
|
|||||||
for (const Link &link : m_links) {
|
for (const Link &link : m_links) {
|
||||||
if (link.from() == output) {
|
if (link.from() == output) {
|
||||||
NodeOperation &op = link.to()->getOperation();
|
NodeOperation &op = link.to()->getOperation();
|
||||||
if (op.isWriteBufferOperation()) {
|
if (op.get_flags().is_write_buffer_operation) {
|
||||||
return (WriteBufferOperation *)(&op);
|
return (WriteBufferOperation *)(&op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -449,7 +449,7 @@ void NodeOperationBuilder::add_input_buffers(NodeOperation * /*operation*/,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NodeOperationOutput *output = input->getLink();
|
NodeOperationOutput *output = input->getLink();
|
||||||
if (output->getOperation().isReadBufferOperation()) {
|
if (output->getOperation().get_flags().is_read_buffer_operation) {
|
||||||
/* input is already buffered, no need to add another */
|
/* input is already buffered, no need to add another */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -491,7 +491,7 @@ void NodeOperationBuilder::add_output_buffers(NodeOperation *operation,
|
|||||||
WriteBufferOperation *writeOperation = nullptr;
|
WriteBufferOperation *writeOperation = nullptr;
|
||||||
for (NodeOperationInput *target : targets) {
|
for (NodeOperationInput *target : targets) {
|
||||||
/* try to find existing write buffer operation */
|
/* try to find existing write buffer operation */
|
||||||
if (target->getOperation().isWriteBufferOperation()) {
|
if (target->getOperation().get_flags().is_write_buffer_operation) {
|
||||||
BLI_assert(writeOperation == nullptr); /* there should only be one write op connected */
|
BLI_assert(writeOperation == nullptr); /* there should only be one write op connected */
|
||||||
writeOperation = (WriteBufferOperation *)(&target->getOperation());
|
writeOperation = (WriteBufferOperation *)(&target->getOperation());
|
||||||
}
|
}
|
||||||
@@ -571,7 +571,7 @@ static void find_reachable_operations_recursive(Tags &reachable, NodeOperation *
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* associated write-buffer operations are executed as well */
|
/* associated write-buffer operations are executed as well */
|
||||||
if (op->isReadBufferOperation()) {
|
if (op->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
|
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
|
||||||
MemoryProxy *memproxy = read_op->getMemoryProxy();
|
MemoryProxy *memproxy = read_op->getMemoryProxy();
|
||||||
find_reachable_operations_recursive(reachable, memproxy->getWriteBufferOperation());
|
find_reachable_operations_recursive(reachable, memproxy->getWriteBufferOperation());
|
||||||
@@ -675,7 +675,7 @@ void NodeOperationBuilder::group_operations()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add new groups for associated memory proxies where needed */
|
/* add new groups for associated memory proxies where needed */
|
||||||
if (op->isReadBufferOperation()) {
|
if (op->get_flags().is_read_buffer_operation) {
|
||||||
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
|
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
|
||||||
MemoryProxy *memproxy = read_op->getMemoryProxy();
|
MemoryProxy *memproxy = read_op->getMemoryProxy();
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ ReadBufferOperation::ReadBufferOperation(DataType datatype)
|
|||||||
this->m_single_value = false;
|
this->m_single_value = false;
|
||||||
this->m_offset = 0;
|
this->m_offset = 0;
|
||||||
this->m_buffer = nullptr;
|
this->m_buffer = nullptr;
|
||||||
|
flags.is_read_buffer_operation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
|
void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ class ReadBufferOperation : public NodeOperation {
|
|||||||
MemoryBufferExtend extend_x,
|
MemoryBufferExtend extend_x,
|
||||||
MemoryBufferExtend extend_y);
|
MemoryBufferExtend extend_y);
|
||||||
void executePixelFiltered(float output[4], float x, float y, float dx[2], float dy[2]) override;
|
void executePixelFiltered(float output[4], float x, float y, float dx[2], float dy[2]) override;
|
||||||
bool isReadBufferOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
void setOffset(unsigned int offset)
|
void setOffset(unsigned int offset)
|
||||||
{
|
{
|
||||||
this->m_offset = offset;
|
this->m_offset = offset;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace blender::compositor {
|
|||||||
SetColorOperation::SetColorOperation()
|
SetColorOperation::SetColorOperation()
|
||||||
{
|
{
|
||||||
this->addOutputSocket(DataType::Color);
|
this->addOutputSocket(DataType::Color);
|
||||||
|
flags.is_set_operation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorOperation::executePixelSampled(float output[4],
|
void SetColorOperation::executePixelSampled(float output[4],
|
||||||
|
|||||||
@@ -80,10 +80,6 @@ class SetColorOperation : public NodeOperation {
|
|||||||
|
|
||||||
void determineResolution(unsigned int resolution[2],
|
void determineResolution(unsigned int resolution[2],
|
||||||
unsigned int preferredResolution[2]) override;
|
unsigned int preferredResolution[2]) override;
|
||||||
bool isSetOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::compositor
|
} // namespace blender::compositor
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace blender::compositor {
|
|||||||
SetValueOperation::SetValueOperation()
|
SetValueOperation::SetValueOperation()
|
||||||
{
|
{
|
||||||
this->addOutputSocket(DataType::Value);
|
this->addOutputSocket(DataType::Value);
|
||||||
|
flags.is_set_operation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValueOperation::executePixelSampled(float output[4],
|
void SetValueOperation::executePixelSampled(float output[4],
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ class SetValueOperation : public NodeOperation {
|
|||||||
void determineResolution(unsigned int resolution[2],
|
void determineResolution(unsigned int resolution[2],
|
||||||
unsigned int preferredResolution[2]) override;
|
unsigned int preferredResolution[2]) override;
|
||||||
|
|
||||||
bool isSetOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::compositor
|
} // namespace blender::compositor
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ namespace blender::compositor {
|
|||||||
SetVectorOperation::SetVectorOperation()
|
SetVectorOperation::SetVectorOperation()
|
||||||
{
|
{
|
||||||
this->addOutputSocket(DataType::Vector);
|
this->addOutputSocket(DataType::Vector);
|
||||||
|
flags.is_set_operation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetVectorOperation::executePixelSampled(float output[4],
|
void SetVectorOperation::executePixelSampled(float output[4],
|
||||||
|
|||||||
@@ -79,10 +79,6 @@ class SetVectorOperation : public NodeOperation {
|
|||||||
|
|
||||||
void determineResolution(unsigned int resolution[2],
|
void determineResolution(unsigned int resolution[2],
|
||||||
unsigned int preferredResolution[2]) override;
|
unsigned int preferredResolution[2]) override;
|
||||||
bool isSetOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setVector(const float vector[3])
|
void setVector(const float vector[3])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ TrackPositionOperation::TrackPositionOperation()
|
|||||||
this->m_position = CMP_TRACKPOS_ABSOLUTE;
|
this->m_position = CMP_TRACKPOS_ABSOLUTE;
|
||||||
this->m_relativeFrame = 0;
|
this->m_relativeFrame = 0;
|
||||||
this->m_speed_output = false;
|
this->m_speed_output = false;
|
||||||
|
flags.is_set_operation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackPositionOperation::initExecution()
|
void TrackPositionOperation::initExecution()
|
||||||
|
|||||||
@@ -93,11 +93,6 @@ class TrackPositionOperation : public NodeOperation {
|
|||||||
void initExecution() override;
|
void initExecution() override;
|
||||||
|
|
||||||
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
|
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
|
||||||
|
|
||||||
bool isSetOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::compositor
|
} // namespace blender::compositor
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ WriteBufferOperation::WriteBufferOperation(DataType datatype)
|
|||||||
this->m_memoryProxy = new MemoryProxy(datatype);
|
this->m_memoryProxy = new MemoryProxy(datatype);
|
||||||
this->m_memoryProxy->setWriteBufferOperation(this);
|
this->m_memoryProxy->setWriteBufferOperation(this);
|
||||||
this->m_memoryProxy->setExecutor(nullptr);
|
this->m_memoryProxy->setExecutor(nullptr);
|
||||||
|
flags.is_write_buffer_operation = true;
|
||||||
}
|
}
|
||||||
WriteBufferOperation::~WriteBufferOperation()
|
WriteBufferOperation::~WriteBufferOperation()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,10 +43,6 @@ class WriteBufferOperation : public NodeOperation {
|
|||||||
return this->m_memoryProxy;
|
return this->m_memoryProxy;
|
||||||
}
|
}
|
||||||
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
|
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
|
||||||
bool isWriteBufferOperation() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
bool isSingleValue() const
|
bool isSingleValue() const
|
||||||
{
|
{
|
||||||
return m_single_value;
|
return m_single_value;
|
||||||
|
|||||||
Reference in New Issue
Block a user