overlay: Remove OVASSERT from getFormatString utility
Remove OVASSERT from getFormatString utility. OVASSERTS should happen only from critically wrong states of overlay. Just failing in this utility method would allow a fall back to GPU. Change-Id: I4467a750574ee90aee4fa2e0fbb041e7f386a63b
This commit is contained in:
parent
9445335019
commit
82a40187e0
@ -478,7 +478,7 @@ int getRotOutFmt(uint32_t format);
|
||||
* rotation is 90, 180 etc
|
||||
* It returns MDP related enum/define that match rot+flip*/
|
||||
int getMdpOrient(eTransform rotation);
|
||||
const char* getFormatString(uint32_t format);
|
||||
const char* getFormatString(int format);
|
||||
const char* getStateString(eOverlayState state);
|
||||
|
||||
// Cannot use HW_OVERLAY_MAGNIFICATION_LIMIT, since at the time
|
||||
@ -579,7 +579,7 @@ inline bool isValidDest(eDest dest)
|
||||
return false;
|
||||
}
|
||||
|
||||
inline const char* getFormatString(uint32_t format){
|
||||
inline const char* getFormatString(int format){
|
||||
static const char* const formats[] = {
|
||||
"MDP_RGB_565",
|
||||
"MDP_XRGB_8888",
|
||||
@ -611,8 +611,10 @@ inline const char* getFormatString(uint32_t format){
|
||||
"MDP_FB_FORMAT",
|
||||
"MDP_IMGTYPE_LIMIT2"
|
||||
};
|
||||
OVASSERT(format < sizeof(formats) / sizeof(formats[0]),
|
||||
"getFormatString wrong fmt %d", format);
|
||||
if(format < 0 || format >= (int)(sizeof(formats) / sizeof(formats[0]))) {
|
||||
ALOGE("%s wrong fmt %d", __FUNCTION__, format);
|
||||
return "Unsupported format";
|
||||
}
|
||||
return formats[format];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user