From 56a2bbe70876c1ac4e18b3740722c01d69bca2fd Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 18 Apr 2012 18:33:19 -0700 Subject: [PATCH] SF needs to render even if we don't have a h/w composer Bug: 6350574, 6361055 Change-Id: Iab92cc31bab4771fca63619c8e3105c759535f72 --- services/surfaceflinger/SurfaceFlinger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f220de399..0d4d2b97a 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -892,9 +892,10 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty) { const DisplayHardware& hw(graphicPlane(0).displayHardware()); HWComposer& hwc(hw.getHwComposer()); + hwc_layer_t* const cur(hwc.getLayers()); const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER); - if (fbLayerCount) { + if (!cur || fbLayerCount) { // Never touch the framebuffer if we don't have any framebuffer layers if (hwc.getLayerCount(HWC_OVERLAY)) { @@ -917,7 +918,6 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty) * and then, render the layers targeted at the framebuffer */ - hwc_layer_t* const cur(hwc.getLayers()); const Vector< sp >& layers(mVisibleLayersSortedByZ); const size_t count = layers.size();