diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-09-13 17:36:47 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-09-13 17:36:47 +0400 |
commit | fdd889717239e8dbc7b3dabf1e3c630d6203837b (patch) | |
tree | 1c6d288bf82767017911498d706cb1fbd1071fcb /source/blender/compositor/intern/COM_ExecutionSystem.cpp | |
parent | ed2343270cca67b866876e1474f928b3315d1875 (diff) |
Cleanup and improvements of the compositor debug output.
Debug code for graphviz output moved to a dedicated file COM_Debug.h/cpp.
The DebugInfo class has only static functions, which are called from a number of places to keep track of what is happening in the compositor. If debugging is disabled these are just inline stubs, so we
don't need #ifdefs everywhere and don't get any overhead.
The graphviz output is much more useful now. DebugInfo keeps track of node names in a static string map for meaningful names. It uses a number of colors for various special operation classes.
ExecutionGroups are indicated in graphviz with clusters.
Currently the graphviz .dot files are stored in the BLI_temporary_dir() folder. A separate dot file is generated for each stage of the ExecutionGroup scheduling, this is intended to give some idea of the
compositor progress, but could still be improved.
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystem.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index ad29405d2e9..716e99a0fa3 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -22,8 +22,6 @@ #include "COM_ExecutionSystem.h" -#include <sstream> - #include "PIL_time.h" #include "BLI_utildefines.h" extern "C" { @@ -40,6 +38,7 @@ extern "C" { #include "COM_WriteBufferOperation.h" #include "COM_ReadBufferOperation.h" #include "COM_ExecutionSystemHelper.h" +#include "COM_Debug.h" #include "BKE_global.h" @@ -101,9 +100,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool re } } -#ifdef COM_DEBUG - ExecutionSystemHelper::debugDump(this); -#endif +// DebugInfo::graphviz(this); } ExecutionSystem::~ExecutionSystem() @@ -133,6 +130,8 @@ ExecutionSystem::~ExecutionSystem() void ExecutionSystem::execute() { + DebugInfo::execute_started(this); + unsigned int order = 0; for (vector<NodeOperation *>::iterator iter = this->m_operations.begin(); iter != this->m_operations.end(); ++iter) { NodeBase *node = *iter; @@ -199,11 +198,13 @@ void ExecutionSystem::executeGroups(CompositorPriority priority) void ExecutionSystem::addOperation(NodeOperation *operation) { ExecutionSystemHelper::addOperation(this->m_operations, operation); -// operation->setBTree + DebugInfo::operation_added(operation); } void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation) { + DebugInfo::operation_read_write_buffer(operation); + // for every input add write and read operation if input is not a read operation // only add read operation to other links when they are attached to buffered operations. unsigned int index; @@ -283,8 +284,10 @@ static void debug_check_node_connections(Node *node) void ExecutionSystem::convertToOperations() { unsigned int index; + for (index = 0; index < this->m_nodes.size(); index++) { Node *node = (Node *)this->m_nodes[index]; + DebugInfo::node_to_operations(node); node->convertToOperations(this, &this->m_context); debug_check_node_connections(node); |