| 870 | #else // NATRON_PLAYBACK_USES_THREAD_POOL |
| 871 | |
| 872 | void |
| 873 | OutputSchedulerThread::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 | |
| 911 | void |
| 912 | OutputSchedulerThread::startTasks(int startingFrame) |
nothing calls this directly
no test coverage detected