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

Would just hit the timeout, no need to wait 16 msec for nothing.
icc-effect-5.14.5
Martin Gräßlin 2015-11-16 08:56:28 +01:00
parent 6bb9f6db7b
commit 8d00355448
1 changed files with 3 additions and 0 deletions

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();