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

Method dettachOpenGLContext_public

Engine/EffectInstance.cpp:4183–4206  ·  view source on GitHub ↗

* @brief This function calls the implementation specific dettachOpenGLContext() **/

Source from the content-addressed store, hash-verified

4181 * @brief This function calls the implementation specific dettachOpenGLContext()
4182 **/
4183StatusEnum
4184EffectInstance::dettachOpenGLContext_public(const OSGLContextPtr& glContext, const EffectInstance::OpenGLContextEffectDataPtr& data)
4185{
4186 NON_RECURSIVE_ACTION();
4187 bool concurrentGLRender = supportsConcurrentOpenGLRenders();
4188 std::unique_ptr<QMutexLocker> locker;
4189 if (concurrentGLRender) {
4190 locker.reset( new QMutexLocker(&_imp->attachedContextsMutex) );
4191 }
4192
4193
4194 bool mustUnlock = data->getHasTakenLock();
4195 EffectInstance::OpenGLContextEffectsMap::iterator found = _imp->attachedContexts.find(glContext);
4196 if ( found != _imp->attachedContexts.end() ) {
4197 _imp->attachedContexts.erase(found);
4198 }
4199
4200 StatusEnum ret = dettachOpenGLContext(data);
4201 if (mustUnlock) {
4202 _imp->attachedContextsMutex.unlock();
4203 }
4204
4205 return ret;
4206}
4207
4208bool
4209EffectInstance::isSupportedComponent(int inputNb,

Callers 1

renderRoIMethod · 0.80

Calls 8

dettachOpenGLContextFunction · 0.85
getHasTakenLockMethod · 0.80
resetMethod · 0.45
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected