File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -986,19 +986,20 @@ void SurfaceFlinger::setupHardwareComposer(Region& dirtyInOut)
986986
987987void SurfaceFlinger::composeSurfaces (const Region& dirty)
988988{
989- if (UNLIKELY (!mWormholeRegion .isEmpty ())) {
989+ const DisplayHardware& hw (graphicPlane (0 ).displayHardware ());
990+ HWComposer& hwc (hw.getHwComposer ());
991+
992+ const size_t fbLayerCount = hwc.getLayerCount (HWC_FRAMEBUFFER);
993+ if (UNLIKELY (fbLayerCount && !mWormholeRegion .isEmpty ())) {
990994 // should never happen unless the window manager has a bug
991995 // draw something...
992996 drawWormhole ();
993997 }
994998
995- const DisplayHardware& hw (graphicPlane (0 ).displayHardware ());
996- HWComposer& hwc (hw.getHwComposer ());
997- hwc_layer_t * const cur (hwc.getLayers ());
998-
999999 /*
10001000 * and then, render the layers targeted at the framebuffer
10011001 */
1002+ hwc_layer_t * const cur (hwc.getLayers ());
10021003 const Vector< sp<LayerBase> >& layers (mVisibleLayersSortedByZ );
10031004 size_t count = layers.size ();
10041005 for (size_t i=0 ; i<count ; i++) {
You can’t perform that action at this time.
0 commit comments