gralloc: Change private usage flags from enums to defines
1. It helps in checking gralloc private usage flags at compile time. 2. Define GRALLOC_MODULE_PERFORM_GET_UBWC_FLAG to enable client to query the value of "PRIV_FLAGS_UBWC_ALIGNED" flag at run time. 3. Add ADRENO_PIXELFORMAT_NV12_EXT in defined Adreno Pixel formats to fix NV12_UBWC HAL pixel format conversion to Adreno format. Change-Id: I78ccac98f1bd1bfbd2aa596ceb7a293f3d2e5f6e
This commit is contained in:
@@ -447,6 +447,17 @@ int gralloc_perform(struct gralloc_module_t const* module,
|
||||
}
|
||||
} break;
|
||||
|
||||
case GRALLOC_MODULE_PERFORM_GET_UBWC_FLAG:
|
||||
{
|
||||
private_handle_t* hnd = va_arg(args, private_handle_t*);
|
||||
int *flag = va_arg(args, int *);
|
||||
if (private_handle_t::validate(hnd)) {
|
||||
return res;
|
||||
}
|
||||
*flag = hnd->flags & private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
|
||||
res = 0;
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user