From e7759c75369e165c5a7640a3ca8c73baac0a6fa3 Mon Sep 17 00:00:00 2001 From: Austin Hu Date: Wed, 29 Mar 2017 16:36:44 +0800 Subject: Do not reset layer type when it is FORCE_FRAMEBUFFER BZ: IMINAN-51402 Author: Hao Liu 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 --- moorefield_hdmi/common/base/HwcLayerList.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/moorefield_hdmi/common/base/HwcLayerList.cpp b/moorefield_hdmi/common/base/HwcLayerList.cpp index a05b4ca..3397956 100755 --- a/moorefield_hdmi/common/base/HwcLayerList.cpp +++ b/moorefield_hdmi/common/base/HwcLayerList.cpp @@ -268,6 +268,7 @@ bool HwcLayerList::initialize() } if ((layer->compositionType != HWC_FRAMEBUFFER_TARGET) && + (layer->compositionType != HWC_FORCE_FRAMEBUFFER) && (layer->compositionType != HWC_SIDEBAND)) layer->compositionType = HWC_FRAMEBUFFER; -- cgit v1.2.3