From ffeb749f691890a5a3555b8427326f5373140cab Mon Sep 17 00:00:00 2001 From: Naomi Luis Date: Thu, 22 Dec 2011 19:34:46 -0800 Subject: [PATCH] liboverlay: Check the is_fg flag in checkOVState Check the is_fg flag along with the other parameters in checkOVState. This is done so that the is_fg flag can also be updated even if there are no updates to the geometry. Change-Id: I82874d01c11eb85fb444c2bdbc50f586db683481 --- liboverlay/overlayLibUI.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/liboverlay/overlayLibUI.cpp b/liboverlay/overlayLibUI.cpp index bda540c..65d5d58 100755 --- a/liboverlay/overlayLibUI.cpp +++ b/liboverlay/overlayLibUI.cpp @@ -26,7 +26,7 @@ using gralloc::alloc_data; namespace { /* helper functions */ bool checkOVState(int w, int h, int format, int orientation, - int zorder, const mdp_overlay& ov) { + int zorder, bool ignoreFB, const mdp_overlay& ov) { switch(orientation) { case HAL_TRANSFORM_ROT_90: case HAL_TRANSFORM_ROT_270: { @@ -45,6 +45,13 @@ bool checkOVState(int w, int h, int format, int orientation, (format == ov.src.format)); bool zOrderCheck = (ov.z_order == zorder); + int is_fg = 0; + if (ignoreFB) + is_fg = 1; + + if (ov.is_fg != is_fg) + return false; + if (displayAttrsCheck && zorder == overlay::NO_INIT) return true; @@ -419,7 +426,8 @@ status_t OverlayUI::setSource(const overlay_buffer_info& info, int orientation, if (mobjOVHelper.getOVInfo(ov) == NO_ERROR) { if (mOrientation == orientation && mFBNum == fbnum && - checkOVState(info.width, info.height, format, orientation, zorder, ov)) + checkOVState(info.width, info.height, format, orientation, + zorder, ignoreFB, ov)) return NO_ERROR; else mChannelState = PENDING_CLOSE;