[hwcomposer] Don't waitVsync if we haven't activated vsync yet

Would just hit the timeout, no need to wait 16 msec for nothing.
This commit is contained in:
Martin Gräßlin 2015-11-16 08:56:28 +01:00
parent 6bb9f6db7b
commit 8d00355448

View file

@ -201,6 +201,9 @@ OpenGLBackend *HwcomposerBackend::createOpenGLBackend()
void HwcomposerBackend::waitVSync()
{
if (!m_hasVsync) {
return;
}
m_vsyncMutex.lock();
m_vsyncWaitCondition.wait(&m_vsyncMutex, m_vsyncInterval);
m_vsyncMutex.unlock();