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

Method aborted

Engine/EffectInstance.cpp:415–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415bool
416EffectInstance::Implementation::aborted(bool isRenderResponseToUserInteraction,
417 const AbortableRenderInfoPtr& abortInfo,
418 const EffectInstancePtr& treeRoot)
419{
420 if (!isRenderResponseToUserInteraction) {
421 // Rendering is playback or render on disk
422
423 // If we have abort info, e just peek the atomic int inside the abort info, this is very fast
424 if ( abortInfo && abortInfo->isAborted() ) {
425 return true;
426 }
427
428 // Fallback on the flag set on the node that requested the render in OutputSchedulerThread
429 if (treeRoot) {
430 OutputEffectInstance* effect = dynamic_cast<OutputEffectInstance*>( treeRoot.get() );
431 assert(effect);
432 if (effect) {
433 return effect->isSequentialRenderBeingAborted();
434 }
435 }
436
437 // We have no other means to know if abort was called
438 return false;
439 } else {
440 // This is a render issued to refresh the image on the Viewer
441
442 if ( !abortInfo || !abortInfo->canAbort() ) {
443 // We do not have any abortInfo set or this render is not abortable. This should be avoided as much as possible!
444 return false;
445 }
446
447 // This is very fast, we just peek the atomic int inside the abort info
448 if ( (int)abortInfo->isAborted() ) {
449 return true;
450 }
451
452 // If this node can start sequential renders (e.g: start playback like on the viewer or render on disk) and it is already doing a sequential render, abort
453 // this render
454 OutputEffectInstance* isRenderEffect = dynamic_cast<OutputEffectInstance*>( treeRoot.get() );
455 if (isRenderEffect) {
456 if ( isRenderEffect->isDoingSequentialRender() ) {
457 return true;
458 }
459 }
460
461 // The render was not aborted
462 return false;
463 }
464}
465
466bool
467EffectInstance::aborted() const

Callers 6

renderHandlerMethod · 0.80
treeRecurseFunctorMethod · 0.80
renderViewer_internalMethod · 0.80
Node.cppFile · 0.80
abortMethod · 0.80

Calls 11

isAbortedMethod · 0.80
canAbortMethod · 0.80
getAbortInfoMethod · 0.80
emptyMethod · 0.80
getEffectInstanceMethod · 0.80
setAbortInfoMethod · 0.80
getMethod · 0.45
getTLSDataMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected