MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / ~ParallelRenderArgsSetter

Method ~ParallelRenderArgsSetter

Engine/ParallelRenderArgs.cpp:846–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844}
845
846ParallelRenderArgsSetter::~ParallelRenderArgsSetter()
847{
848 for (NodesList::iterator it = nodes.begin(); it != nodes.end(); ++it) {
849 if ( !(*it) || !(*it)->getEffectInstance() ) {
850 continue;
851 }
852 (*it)->getEffectInstance()->invalidateParallelRenderArgsTLS();
853
854 if ( (*it)->isMultiInstance() ) {
855 ///If the node has children, set the thread-local storage on them too, even if they do not render, it can be useful for expressions
856 ///on parameters.
857 NodesList children;
858 (*it)->getChildrenMultiInstance(&children);
859 for (NodesList::iterator it2 = children.begin(); it2 != children.end(); ++it2) {
860 (*it2)->getEffectInstance()->invalidateParallelRenderArgsTLS();
861 }
862 }
863
864 /* NodeGroup* isGrp = (*it)->isEffectGroup();
865 if (isGrp) {
866 isGrp->invalidateParallelRenderArgs();
867 }*/
868 }
869
870 if (argsMap) {
871 for (std::map<NodePtr, ParallelRenderArgsPtr>::iterator it = argsMap->begin(); it != argsMap->end(); ++it) {
872 it->first->getEffectInstance()->invalidateParallelRenderArgsTLS();
873 }
874 }
875
876 OSGLContextPtr glContext = _openGLContext.lock();
877 if (glContext) {
878 // This render is going to end, release the OpenGL context so that another frame render may use it
879 appPTR->getGPUContextPool()->releaseGLContextFromRender(glContext);
880 }
881}
882
883ParallelRenderArgs::ParallelRenderArgs()
884 : time(0)

Callers

nothing calls this directly

Calls 9

getEffectInstanceMethod · 0.80
isMultiInstanceMethod · 0.80
getGPUContextPoolMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected