Use a separate render thread even with a V-Sync source

This commit is contained in:
Cameron Gutman
2019-02-15 22:09:50 -08:00
parent 81c6202582
commit f03d12b677
2 changed files with 49 additions and 29 deletions
@@ -33,11 +33,13 @@ private:
void renderFrame(AVFrame* frame);
QQueue<AVFrame*> m_FrameQueue;
QQueue<int> m_FrameQueueHistory;
QQueue<AVFrame*> m_RenderQueue;
QQueue<AVFrame*> m_PacingQueue;
QQueue<int> m_PacingQueueHistory;
QQueue<int> m_RenderTimeHistory;
QMutex m_FrameQueueLock;
QWaitCondition m_FrameQueueNotEmpty;
QWaitCondition m_RenderQueueNotEmpty;
QWaitCondition m_PacingQueueNotEmpty;
SDL_Thread* m_RenderThread;
bool m_Stopping;