| 3078 | } |
| 3079 | |
| 3080 | void |
| 3081 | RenderEngine::renderCurrentFrameInternal(bool enableRenderStats, |
| 3082 | bool canAbort) |
| 3083 | { |
| 3084 | assert( QThread::currentThread() == qApp->thread() ); |
| 3085 | |
| 3086 | ViewerInstance* isViewer = dynamic_cast<ViewerInstance*>( _imp->output.lock().get() ); |
| 3087 | if (!isViewer) { |
| 3088 | qDebug() << "RenderEngine::renderCurrentFrame for a writer is unsupported"; |
| 3089 | |
| 3090 | return; |
| 3091 | } |
| 3092 | |
| 3093 | |
| 3094 | ///If the scheduler is already doing playback, continue it |
| 3095 | if (_imp->scheduler) { |
| 3096 | bool working = _imp->scheduler->isWorking(); |
| 3097 | if (working) { |
| 3098 | _imp->scheduler->abortThreadedTask(); |
| 3099 | } |
| 3100 | if ( working || isPlaybackAutoRestartEnabled() ) { |
| 3101 | RenderDirectionEnum lastDirection; |
| 3102 | std::vector<ViewIdx> lastViews; |
| 3103 | _imp->scheduler->getLastRunArgs(&lastDirection, &lastViews); |
| 3104 | _imp->scheduler->renderFromCurrentFrame( enableRenderStats, lastViews, lastDirection); |
| 3105 | |
| 3106 | return; |
| 3107 | } |
| 3108 | } |
| 3109 | |
| 3110 | |
| 3111 | { |
| 3112 | QMutexLocker k(&_imp->schedulerCreationLock); |
| 3113 | if (!_imp->scheduler) { |
| 3114 | _imp->scheduler = createScheduler( _imp->output.lock() ); |
| 3115 | } |
| 3116 | } |
| 3117 | |
| 3118 | if (!_imp->currentFrameScheduler) { |
| 3119 | _imp->currentFrameScheduler = new ViewerCurrentFrameRequestScheduler(isViewer); |
| 3120 | } |
| 3121 | |
| 3122 | _imp->currentFrameScheduler->renderCurrentFrame(enableRenderStats, canAbort); |
| 3123 | } |
| 3124 | |
| 3125 | void |
| 3126 | RenderEngine::renderCurrentFrame(bool enableRenderStats, |
nothing calls this directly
no test coverage detected