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

Method startTasksFromLastStartedFrame

Engine/OutputSchedulerThread.cpp:872–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870#else // NATRON_PLAYBACK_USES_THREAD_POOL
871
872void
873OutputSchedulerThread::startTasksFromLastStartedFrame()
874{
875 int frame;
876 bool canContinue;
877
878 {
879 QMutexLocker l(&_imp->framesToRenderMutex);
880 RenderDirectionEnum direction;
881 int firstFrame, lastFrame, frameStep;
882 {
883 QMutexLocker l(&_imp->runArgsMutex);
884 direction = _imp->livingRunArgs.timelineDirection;
885 firstFrame = _imp->livingRunArgs.firstFrame;
886 lastFrame = _imp->livingRunArgs.lastFrame;
887 frameStep = _imp->livingRunArgs.frameStep;
888 }
889 PlaybackModeEnum pMode = _imp->engine->getPlaybackMode();
890
891 frame = _imp->lastFramePushedIndex;
892 if ( (firstFrame == lastFrame) && (frame == firstFrame) ) {
893 return;
894 }
895 RenderDirectionEnum newDirection = direction;
896 ///If startingTime is already taken into account in the framesToRender, push new frames from the last one in the stack instead
897 canContinue = OutputSchedulerThreadPrivate::getNextFrameInSequence(pMode, direction, frame,
898 firstFrame, lastFrame, frameStep, &frame, &newDirection);
899 if (newDirection != direction) {
900 QMutexLocker l(&_imp->runArgsMutex);
901 _imp->livingRunArgs.timelineDirection = newDirection;
902 }
903 }
904
905 if (canContinue) {
906 QMutexLocker l(&_imp->renderThreadsMutex);
907 startTasks(frame);
908 }
909}
910
911void
912OutputSchedulerThread::startTasks(int startingFrame)

Callers

nothing calls this directly

Calls 1

getPlaybackModeMethod · 0.45

Tested by

no test coverage detected