[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:
parent
6bb9f6db7b
commit
8d00355448
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue