mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-24 23:09:51 +02:00
Use a higher thread priority for Oculus present
This commit is contained in:
parent
825fc1cfa1
commit
9bf4804d3d
3 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,7 @@ public:
|
||||||
|
|
||||||
if (newPlugin) {
|
if (newPlugin) {
|
||||||
bool hasVsync = true;
|
bool hasVsync = true;
|
||||||
|
QThread::setPriority(newPlugin->getPresentPriority());
|
||||||
bool wantVsync = newPlugin->wantVsync();
|
bool wantVsync = newPlugin->wantVsync();
|
||||||
_context->makeCurrent();
|
_context->makeCurrent();
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
#include <QtCore/QThread>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtGui/QImage>
|
#include <QtGui/QImage>
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ protected:
|
||||||
|
|
||||||
void updateCompositeFramebuffer();
|
void updateCompositeFramebuffer();
|
||||||
|
|
||||||
|
virtual QThread::Priority getPresentPriority() { return QThread::HighPriority; }
|
||||||
virtual void compositeLayers();
|
virtual void compositeLayers();
|
||||||
virtual void compositeScene();
|
virtual void compositeScene();
|
||||||
virtual void compositeOverlay();
|
virtual void compositeOverlay();
|
||||||
|
|
|
@ -24,6 +24,8 @@ public:
|
||||||
virtual QJsonObject getHardwareStats() const;
|
virtual QJsonObject getHardwareStats() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
QThread::Priority getPresentPriority() override { return QThread::TimeCriticalPriority; }
|
||||||
|
|
||||||
bool internalActivate() override;
|
bool internalActivate() override;
|
||||||
void hmdPresent() override;
|
void hmdPresent() override;
|
||||||
bool isHmdMounted() const override;
|
bool isHmdMounted() const override;
|
||||||
|
|
Loading…
Reference in a new issue