hwc2: Do not flush on empty layer stack.
-- Some applications can take time to queue buffers during switches ie;
HDR to Non-HDR, Secure to Non-secure etc; Even though layer stack
is empty it is OK to display previous frame.
-- Composer Client explicitly clears layers upon SurfaceFlinger death.
Since client isn't active, chances of getting a new frame is very unlikey.
Trigger flush so that content gets cleared.
Change-Id: If91135b3d5ea6d0f8842c7ef75547a68002c70ff
CRs-Fixed: 2489780
5 files changed