diff options
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeOperation.cc')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeOperation.cc | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cc b/source/blender/compositor/intern/COM_NodeOperation.cc index 297ef100a1b..6c60a858b6c 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.cc +++ b/source/blender/compositor/intern/COM_NodeOperation.cc @@ -20,6 +20,7 @@ #include <typeinfo> #include "COM_ExecutionSystem.h" +#include "COM_ReadBufferOperation.h" #include "COM_defines.h" #include "COM_NodeOperation.h" /* own include */ @@ -209,4 +210,72 @@ void NodeOperationOutput::determineResolution(unsigned int resolution[2], } } +std::ostream &operator<<(std::ostream &os, const NodeOperationFlags &node_operation_flags) +{ + if (node_operation_flags.complex) { + os << "complex,"; + } + if (node_operation_flags.open_cl) { + os << "open_cl,"; + } + if (node_operation_flags.single_threaded) { + os << "single_threaded,"; + } + if (node_operation_flags.use_render_border) { + os << "render_border,"; + } + if (node_operation_flags.use_viewer_border) { + os << "view_border,"; + } + if (node_operation_flags.is_resolution_set) { + os << "resolution_set,"; + } + if (node_operation_flags.is_set_operation) { + os << "set_operation,"; + } + if (node_operation_flags.is_write_buffer_operation) { + os << "write_buffer,"; + } + if (node_operation_flags.is_read_buffer_operation) { + os << "read_buffer,"; + } + if (node_operation_flags.is_proxy_operation) { + os << "proxy,"; + } + if (node_operation_flags.is_viewer_operation) { + os << "viewer,"; + } + if (node_operation_flags.is_preview_operation) { + os << "preview,"; + } + if (!node_operation_flags.use_datatype_conversion) { + os << "no_conversion,"; + } + + return os; +} + +std::ostream &operator<<(std::ostream &os, const NodeOperation &node_operation) +{ + NodeOperationFlags flags = node_operation.get_flags(); + os << "NodeOperation("; + if (!node_operation.get_name().empty()) { + os << "name=" << node_operation.get_name() << ","; + } + os << "flags={" << flags << "},"; + if (flags.is_read_buffer_operation) { + const ReadBufferOperation *read_operation = (const ReadBufferOperation *)&node_operation; + const MemoryProxy *proxy = read_operation->getMemoryProxy(); + if (proxy) { + const WriteBufferOperation *write_operation = proxy->getWriteBufferOperation(); + if (write_operation) { + os << "write=" << (NodeOperation &)*write_operation << ","; + } + } + } + os << ")"; + + return os; +} + } // namespace blender::compositor |