Do not reset layer type when it is FORCE_FRAMEBUFFER

BZ: IMINAN-51402

Author: Hao Liu <hao.liu@intel.com>

It fixes the regression caused by patch
https://partner-android-review.googlesource.com/#/c/759127/.

After HwcLayerList::initialize(), layers are attached with planes.
Then HwcLayerList::update() is invoked, it will DOUBLE-CHECK whether
planes are assigned properly. If not, the relevant layer's type is
set to FORCE_FRAMEBUFFER, which means it is attached to a wrong plane
or it should not be assigned to any plane at all. Then, we re-invoke
initialize() to assign planes for the 2nd time.

In that case, we should not reset the FORCE_FRAMEBUFFER layers' type.

Although the case above rarely happens, here's an example:
When we play some INTERLACED video, the real height of the video is
only half of its original label. It may trigger the planes assigned
to be invalid, then we need to withdraw the plane and do the
"FORCE_FRAMEBUFFER" stuff.

Test: netflix, playmovies, youtube

Change-Id: I730fa11ff1541a9e383778811607155c765b48e9
Signed-off-by: Austin Hu <austin.hu@intel.com>
1 file changed
tree: 6d8daf0034e0f930864b7ad64e414cc6ca304a66
  1. merrifield/
  2. moorefield_hdmi/