MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / newMemoryInstance

Method newMemoryInstance

Engine/OfxImageEffectInstance.cpp:1108–1123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1106}
1107
1108OFX::Host::Memory::Instance*
1109OfxImageEffectInstance::newMemoryInstance(size_t nBytes)
1110{
1111 OfxEffectInstancePtr effect = getOfxEffectInstance();
1112 OfxMemory* ret = new OfxMemory(effect);
1113 bool allocated = ret->alloc(nBytes);
1114
1115 if ( ( (nBytes != 0) && !ret->getPtr() ) || !allocated ) {
1116 Dialogs::errorDialog( tr("Out of memory").toStdString(),
1117 tr("%1 failed to allocate memory (%2).")
1118 .arg( QString::fromUtf8( getOfxEffectInstance()->getNode()->getLabel_mt_safe().c_str() ) )
1119 .arg( printAsRAM(nBytes) ).toStdString() );
1120 }
1121
1122 return ret;
1123}
1124
1125bool
1126OfxImageEffectInstance::areAllNonOptionalClipsConnected() const

Callers

nothing calls this directly

Calls 7

getOfxEffectInstanceFunction · 0.85
printAsRAMFunction · 0.85
toStdStringMethod · 0.80
getLabel_mt_safeMethod · 0.80
allocMethod · 0.45
getPtrMethod · 0.45
getNodeMethod · 0.45

Tested by

no test coverage detected