| 1953 | } |
| 1954 | |
| 1955 | void |
| 1956 | AppInstance::startNextQueuedRender(OutputEffectInstance* finishedWriter) |
| 1957 | { |
| 1958 | RenderQueueItem nextWork; |
| 1959 | |
| 1960 | // Do not make the process die under the mutex otherwise we may deadlock |
| 1961 | ProcessHandlerPtr processDying; |
| 1962 | { |
| 1963 | QMutexLocker k(&_imp->renderQueueMutex); |
| 1964 | for (std::list<RenderQueueItem>::iterator it = _imp->activeRenders.begin(); it != _imp->activeRenders.end(); ++it) { |
| 1965 | if (it->work.writer == finishedWriter) { |
| 1966 | processDying = it->process; |
| 1967 | _imp->activeRenders.erase(it); |
| 1968 | break; |
| 1969 | } |
| 1970 | } |
| 1971 | if ( !_imp->renderQueue.empty() ) { |
| 1972 | nextWork = _imp->renderQueue.front(); |
| 1973 | _imp->renderQueue.pop_front(); |
| 1974 | } else { |
| 1975 | return; |
| 1976 | } |
| 1977 | } |
| 1978 | processDying.reset(); |
| 1979 | |
| 1980 | _imp->startRenderingFullSequence(false, nextWork); |
| 1981 | } |
| 1982 | |
| 1983 | void |
| 1984 | AppInstance::onBackgroundRenderProcessFinished() |