[hwcomposer] Use newer setOutputsEnabled API instead of blocking buffer swap

The newer API is designed for the case that outputs are disabled and
makes sure that we don't have to abuse the aboutToSwapBuffers. This
also prevents possible conflicts between blocking during rendering and
screens being off.

Reviewed-By: Bhushan Shah
This commit is contained in:
Martin Gräßlin 2015-10-20 09:39:03 +02:00
parent a730b5d2f6
commit 98a669d70f

View file

@ -169,11 +169,9 @@ void HwcomposerBackend::toggleBlankOutput()
enableVSync(false);
}
// enable/disable compositor repainting when blanked
setOutputsEnabled(!m_outputBlank);
if (Compositor *compositor = Compositor::self()) {
if (m_outputBlank) {
compositor->aboutToSwapBuffers();
} else {
compositor->bufferSwapComplete();
if (!m_outputBlank) {
compositor->addRepaintFull();
}
}