Merge branch 'master' of https://github.com/highfidelity/hifi into QmlMarketplace

This commit is contained in:
Roxanne Skelly 2019-02-15 12:33:44 -08:00
commit 6d38dcbfad
4 changed files with 9 additions and 2 deletions

View file

@ -720,7 +720,7 @@ void OpenGLDisplayPlugin::present() {
}
gpu::Backend::freeGPUMemSize.set(gpu::gl::getFreeDedicatedMemory());
} else {
} else if (alwaysPresent()) {
internalPresent();
}
_movingAveragePresent.addSample((float)(usecTimestampNow() - startPresent));

View file

@ -88,6 +88,11 @@ protected:
glm::uvec2 getSurfaceSize() const;
glm::uvec2 getSurfacePixels() const;
// Some display plugins require us to always execute some present logic,
// whether we have a frame or not (Oculus Mobile plugin)
// Such plugins must be prepared to do the right thing if the `_currentFrame`
// is not populated
virtual bool alwaysPresent() const { return false; }
void updateCompositeFramebuffer();

View file

@ -57,6 +57,7 @@ protected:
void internalPresent() override;
void hmdPresent() override { throw std::runtime_error("Unused"); }
bool isHmdMounted() const override;
bool alwaysPresent() const override { return true; }
static const char* NAME;
mutable gl::Context* _mainContext{ nullptr };

View file

@ -14,6 +14,7 @@
#include <QJsonObject>
#include <QMessageBox>
#include <QProcess>
#include <QRegularExpression>
#include <quazip5/quazip.h>
#include <quazip5/JlCompress.h>
@ -589,4 +590,4 @@ void AWSInterface::updateAWS() {
QStringList parameters = QStringList() << "-c" << _pythonCommand + " " + filename;
process->start("sh", parameters);
#endif
}
}