bo = calloc(1, sizeof(struct _tbm_bo));
if (!bo) {
- /* LCOV_EXCL_START */
TBM_ERR("memory allocationc failed.");
error = TBM_ERROR_OUT_OF_MEMORY;
goto failed;
- /* LCOV_EXCL_STOP */
}
bo->bo_data = tbm_module_alloc_bo_data(bufmgr->module, bo, size, flags, &error);
if (!bo->bo_data) {
- /* LCOV_EXCL_START */
TBM_ERR("tbm_module_alloc_bo_data failed. size:%d flags:%s error:%d", size, _tbm_flag_to_str(flags), error);
free(bo);
_tbm_set_last_result(error);
_tbm_bufmgr_mutex_unlock();
goto failed;
- /* LCOV_EXCL_STOP */
}
_tbm_bufmgr_initialize_bo(bufmgr, bo, flags);
return bo;
-/* LCOV_EXCL_START */
failed:
_tbm_set_last_result(error);
_tbm_bufmgr_mutex_unlock();
return NULL;
-/* LCOV_EXCL_STOP */
}
-
-/* LCOV_EXCL_START */
-
tbm_bo
tbm_bufmgr_internal_alloc_bo_with_format(tbm_bufmgr bufmgr, int format, int bo_idx, int width,
int height, int bpp, tbm_bo_memory_type flags, tbm_error_e *error)
bo = calloc(1, sizeof(struct _tbm_bo));
if (!bo) {
- /* LCOV_EXCL_START */
TBM_ERR("memory allocationc failed.");
*error = TBM_ERROR_OUT_OF_MEMORY;
goto failed;
- /* LCOV_EXCL_STOP */
}
bo->bo_data = tbm_module_alloc_bo_data_with_format(bufmgr->module, format, bo_idx, width, height, bpp, flags, error);
if (!bo->bo_data) {
- /* LCOV_EXCL_START */
free(bo);
goto failed;
- /* LCOV_EXCL_STOP */
}
_tbm_bufmgr_initialize_bo(bufmgr, bo, flags);
return bo;
-/* LCOV_EXCL_START */
failed:
_tbm_bufmgr_mutex_unlock();
return NULL;
-/* LCOV_EXCL_STOP */
}
tbm_bo
bo = calloc(1, sizeof(struct _tbm_bo));
if (!bo) {
- /* LCOV_EXCL_START */
TBM_ERR("memory allocationc failed.");
*error = TBM_ERROR_OUT_OF_MEMORY;
_tbm_bufmgr_mutex_unlock();
return NULL;
- /* LCOV_EXCL_STOP */
}
bo->bo_data = bo_data;
bo->get_from_surface_data = 1;
bo = calloc(1, sizeof(struct _tbm_bo));
if (!bo) {
- /* LCOV_EXCL_START */
TBM_ERR("memory allocationc failed.");
goto failed;
- /* LCOV_EXCL_STOP */
}
bo->bo_data = tbm_module_import_bo_data_with_key(bufmgr->module, bo, key, &error);
if (!bo->bo_data) {
- /* LCOV_EXCL_START */
TBM_ERR("tbm_module_import_bo_data_with_key failed. tbm_key:%d", key);
free(bo);
goto failed;
- /* LCOV_EXCL_STOP */
}
// return the existed bo2 if bo->bo_data and bo2->bo_data is the same
bo = calloc(1, sizeof(struct _tbm_bo));
if (!bo) {
- /* LCOV_EXCL_START */
TBM_ERR("memory allocationc failed.");
goto failed;
- /* LCOV_EXCL_STOP */
}
bo->bo_data = tbm_module_import_bo_data_with_fd(bufmgr->module, bo, fd, &error);
if (!bo->bo_data) {
- /* LCOV_EXCL_START */
TBM_ERR("tbm_module_import_bo_data_with_fd failed. tbm_fd:%d", fd);
free(bo);
goto failed;
- /* LCOV_EXCL_STOP */
}
// return the existed bo2 if bo->bo_data and bo2->bo_data is the same