liboverlay: Remove RGB specific checks

liboverlay assumes RGB format comes from UI,
which is incorrect. Remove RGB format checks.

Change-Id: I4d3f69db272b0a229fbd449c9c8863d77e7b0a2f
This commit is contained in:
Naomi Luis 2011-05-25 22:36:44 -07:00 committed by Govind Surti
parent 49f32e10cb
commit c004f71e01

View File

@ -109,29 +109,6 @@ static int get_mdp_orientation(int rotation, int flip) {
return -1;
}
static bool isRGBType(int format) {
switch (format) {
case MDP_RGBA_8888:
case MDP_BGRA_8888:
case MDP_RGBX_8888:
case MDP_RGB_565:
return true;
}
return false;
}
static int getRGBBpp(int format) {
switch (format) {
case MDP_RGBA_8888:
case MDP_BGRA_8888:
case MDP_RGBX_8888:
return 4;
case MDP_RGB_565:
return 2;
}
return -1;
}
#define LOG_TAG "OverlayLIB"
static void reportError(const char* message) {
LOGE( "%s", message);
@ -383,10 +360,6 @@ bool Overlay::setSource(uint32_t w, uint32_t h, int format, int orientation,
stateChanged = s3dChanged|hasHDMIStatusChanged();
if (stateChanged || !objOvCtrlChannel[0].setSource(w, h, colorFormat, orientation, ignoreFB)) {
if (mChannelUP && isRGBType(hw_format) && (stateChanged != 0x10)) {
mCloseChannel = true;
return false;
}
closeChannel();
mS3DFormat = format3D;
@ -709,10 +682,6 @@ bool OverlayControlChannel::startOVRotatorSessions(int w, int h,
bool ret = true;
if (!mNoRot) {
if (isRGBType(format) && mOVInfo.is_fg) {
w = (w + 31) & ~31;
h = (h + 31) & ~31;
}
mRotInfo.src.format = format;
mRotInfo.src.width = w;
mRotInfo.src.height = h;
@ -747,16 +716,7 @@ bool OverlayControlChannel::startOVRotatorSessions(int w, int h,
}
}
if (!mNoRot && isRGBType(format) && mOrientation && mOVInfo.is_fg) {
mOVInfo.dst_rect.w = mFBWidth;
mOVInfo.dst_rect.h = mFBHeight;
ret = setParameter(OVERLAY_TRANSFORM, mOrientation, false);
if (!ret) {
reportError("Overlay set failed.. ");
return false;
}
}
else if (ioctl(mFD, MSMFB_OVERLAY_SET, &mOVInfo)) {
if (ret && ioctl(mFD, MSMFB_OVERLAY_SET, &mOVInfo)) {
reportError("startOVRotatorSessions, Overlay set failed");
ret = false;
}