return bo;
}
+
+tbm_bo
+tbm_bo_alloc_with_bo_data(tbm_bufmgr bufmgr, tbm_backend_bo_data *bo_data, int flags)
+{
+ tbm_bo bo;
+
+ _tbm_bufmgr_mutex_lock();
+ _tbm_set_last_result(TBM_ERROR_NONE);
+
+ TBM_BO_RETURN_VAL_IF_FAIL(TBM_BUFMGR_IS_VALID(bufmgr), NULL);
+ TBM_BO_RETURN_VAL_IF_FAIL(bo_data, NULL);
+
+ bo = calloc(1, sizeof(struct _tbm_bo));
+ if (!bo) {
+ /* LCOV_EXCL_START */
+ _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
+ _tbm_bufmgr_mutex_unlock();
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
+
+ _tbm_util_check_bo_cnt(bufmgr);
+
+ bo->bo_data = bo_data;
+
+ _tbm_bo_init(bufmgr, bo, flags);
+
+ TBM_TRACE_BO("bo(%p) refcnt(%d), flag(%s)\n", bo, bo->ref_cnt, _tbm_flag_to_str(bo->flags));
+
+ _tbm_bufmgr_mutex_unlock();
+
+ return bo;
+}
+
/* LCOV_EXCL_STOP */
tbm_bo
tbm_bo tbm_bo_alloc_with_tiled_format(tbm_bufmgr bufmgr, int width, int height, int bpp, int format,
tbm_bo_memory_type flags, int bo_idx, tbm_error_e *error);
tbm_bo tbm_bo_alloc_with_surface(tbm_bufmgr bufmgr, int width, int height, int format, int flags, int bo_idx);
+tbm_bo tbm_bo_alloc_with_bo_data(tbm_bufmgr bufmgr, tbm_backend_bo_data *bo_data, int flags);
#endif /* _TBM_BUFMGR_INT_H_ */