backend can change flag of tbm bo
flag should be got from backend
Change-Id: Ib38b15ed2ac051fe2b6a3ed62541726a5b04acd7
int
tbm_bo_get_flags(tbm_bo bo)
{
+ tbm_error_e error;
int flags;
_tbm_bufmgr_mutex_lock();
+ _tbm_set_last_result(TBM_ERROR_NONE);
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
- flags = bo->flags;
+ flags = tbm_bo_data_get_memory_types(bo->bo_data, &error);
+ if (error != TBM_ERROR_NONE) {
+ TBM_ERR("tbm_bo_data_get_memory_types filed.");
+ flags = TBM_BO_DEFAULT;
+ _tbm_set_last_result(error);
+ }
TBM_TRACE_BO("bo(%p)\n", bo);