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