* @brief This function calls the implementation specific dettachOpenGLContext() **/
| 4181 | * @brief This function calls the implementation specific dettachOpenGLContext() |
| 4182 | **/ |
| 4183 | StatusEnum |
| 4184 | EffectInstance::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 | |
| 4208 | bool |
| 4209 | EffectInstance::isSupportedComponent(int inputNb, |
no test coverage detected