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

Method tryLock

Engine/Node.cpp:4410–4425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4408}
4409
4410bool
4411Node::tryLock(const ImagePtr & image)
4412{
4413 QMutexLocker l(&_imp->imagesBeingRenderedMutex);
4414 std::list<ImagePtr>::iterator it =
4415 std::find(_imp->imagesBeingRendered.begin(), _imp->imagesBeingRendered.end(), image);
4416
4417 if ( it != _imp->imagesBeingRendered.end() ) {
4418 return false;
4419 }
4420 ///Okay the image is not used by any other thread, claim that we want to use it
4421 assert( it == _imp->imagesBeingRendered.end() );
4422 _imp->imagesBeingRendered.push_back(image);
4423
4424 return true;
4425}
4426
4427void
4428Node::unlock(const ImagePtr & image)

Callers 15

initGlMethod · 0.45
getPatternCacheMethod · 0.45
updatePatternCacheMethod · 0.45
~ProcessInputChannelMethod · 0.45
appendBufferedFrameMethod · 0.45
getFromBufferAndEraseMethod · 0.45
appendRunnableMethod · 0.45
getRunnableIteratorMethod · 0.45

Calls 3

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected