From 98a669d70f0ce3c0f8372345aa35a2e2731e42a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 20 Oct 2015 09:39:03 +0200 Subject: [PATCH] [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 --- backends/hwcomposer/hwcomposer_backend.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backends/hwcomposer/hwcomposer_backend.cpp b/backends/hwcomposer/hwcomposer_backend.cpp index 8d5b706ac3..0d30324ac5 100644 --- a/backends/hwcomposer/hwcomposer_backend.cpp +++ b/backends/hwcomposer/hwcomposer_backend.cpp @@ -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(); } }