From a3742036fc508a8a55854d8edd1ce47cfe449e9c Mon Sep 17 00:00:00 2001 From: Omprakash Dhyade Date: Thu, 3 Mar 2011 14:06:29 -0800 Subject: [PATCH] liboverlay: Remove RGB specific checks liboverlay assumes RGB format comes from UI, which is incorrect. Remove RGB format checks. Change-Id: I001d36dcc6bdec043c29b21c072be91bd45d4999 --- liboverlay/overlayLib.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/liboverlay/overlayLib.cpp b/liboverlay/overlayLib.cpp index 0d35e9b..f2ea2fa 100644 --- a/liboverlay/overlayLib.cpp +++ b/liboverlay/overlayLib.cpp @@ -630,10 +630,6 @@ bool OverlayControlChannel::setOverlayInformation(int w, int h, mOVInfo.alpha = 0xff; mOVInfo.transp_mask = 0xffffffff; mOVInfo.flags = flags; - if (isRGBType(format)) - mOVInfo.is_fg = ignoreFB; - if (ignoreFB && isRGBType(format) && getRGBBpp(format) == 4) - mOVInfo.flags &= ~MDP_OV_PIPE_SHARE; if (!ignoreFB) mOVInfo.flags |= MDP_OV_PLAY_NOWAIT; mSize = get_size(format, w, h); @@ -784,23 +780,17 @@ bool OverlayControlChannel::setSource(uint32_t w, uint32_t h, } if (w == mOVInfo.src.width && h == mOVInfo.src.height && format == mOVInfo.src.format && orientation == mOrientation) { - if ((ignoreFB == mOVInfo.is_fg) && isRGBType(format)) - return true; mdp_overlay ov; ov.id = mOVInfo.id; if (ioctl(mFD, MSMFB_OVERLAY_GET, &ov)) return false; mOVInfo = ov; - if (isRGBType(format)) - mOVInfo.is_fg = ignoreFB; + if (!ignoreFB) + mOVInfo.flags |= MDP_OV_PLAY_NOWAIT; + else + mOVInfo.flags &= ~MDP_OV_PLAY_NOWAIT; - if (!isRGBType(format)) { - if (!ignoreFB) - mOVInfo.flags |= MDP_OV_PLAY_NOWAIT; - else - mOVInfo.flags &= ~MDP_OV_PLAY_NOWAIT; - } if (ioctl(mFD, MSMFB_OVERLAY_SET, &mOVInfo)) return false; return true;