mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 21:36:34 +02:00
Run the present thread at highest priority
This commit is contained in:
parent
6a66d74e19
commit
2b127720f8
1 changed files with 8 additions and 1 deletions
|
@ -28,6 +28,11 @@
|
|||
#include <GLMHelpers.h>
|
||||
|
||||
#if THREADED_PRESENT
|
||||
|
||||
// FIXME, for display plugins that don't block on something like vsync, just
|
||||
// cap the present rate at 200
|
||||
// const static unsigned int MAX_PRESENT_RATE = 200;
|
||||
|
||||
class PresentThread : public QThread, public Dependency {
|
||||
using Mutex = std::mutex;
|
||||
using Condition = std::condition_variable;
|
||||
|
@ -66,8 +71,10 @@ public:
|
|||
_context->moveToThread(this);
|
||||
}
|
||||
|
||||
|
||||
virtual void run() override {
|
||||
OpenGLDisplayPlugin* currentPlugin{ nullptr };
|
||||
thread()->setPriority(QThread::HighestPriority);
|
||||
Q_ASSERT(_context);
|
||||
while (!_shutdown) {
|
||||
if (_pendingMainThreadOperation) {
|
||||
|
@ -450,4 +457,4 @@ void OpenGLDisplayPlugin::enableDeactivate() {
|
|||
_uncustomized = true;
|
||||
_deactivateWait.notify_one();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue