| 6700 | } // Node::doDestroyNodeInternalEnd |
| 6701 | |
| 6702 | void |
| 6703 | Node::destroyNode(bool blockingDestroy, bool autoReconnect) |
| 6704 | { |
| 6705 | if (!_imp->effect) { |
| 6706 | return; |
| 6707 | } |
| 6708 | |
| 6709 | { |
| 6710 | QMutexLocker k(&_imp->activatedMutex); |
| 6711 | _imp->isBeingDestroyed = true; |
| 6712 | } |
| 6713 | |
| 6714 | bool allProcessingQuit = areAllProcessingThreadsQuit(); |
| 6715 | if (allProcessingQuit || blockingDestroy) { |
| 6716 | if (!allProcessingQuit) { |
| 6717 | quitAnyProcessing_blocking(false); |
| 6718 | } |
| 6719 | doDestroyNodeInternalEnd(false); |
| 6720 | } else { |
| 6721 | NodeGroup* isGrp = dynamic_cast<NodeGroup*>( _imp->effect.get() ); |
| 6722 | NodesList nodesToWatch; |
| 6723 | nodesToWatch.push_back( shared_from_this() ); |
| 6724 | if (isGrp) { |
| 6725 | isGrp->getNodes_recursive(nodesToWatch, false); |
| 6726 | } |
| 6727 | _imp->renderWatcher.reset( new NodeRenderWatcher(nodesToWatch) ); |
| 6728 | QObject::connect( _imp->renderWatcher.get(), SIGNAL(taskFinished(int,WatcherCallerArgsPtr)), this, SLOT(onProcessingQuitInDestroyNodeInternal(int,WatcherCallerArgsPtr)) ); |
| 6729 | boost::shared_ptr<NodeDestroyNodeInternalArgs> args( new NodeDestroyNodeInternalArgs() ); |
| 6730 | args->autoReconnect = autoReconnect; |
| 6731 | _imp->renderWatcher->scheduleBlockingTask(NodeRenderWatcher::eBlockingTaskQuitAnyProcessing, args); |
| 6732 | |
| 6733 | } |
| 6734 | } // Node::destroyNodeInternal |
| 6735 | |
| 6736 | |
| 6737 | KnobPtr |
no test coverage detected