From: SooChan Lim Date: Tue, 22 Jun 2021 01:17:24 +0000 (+0900) Subject: tbm_module: change tbm_module_bufmgr_ to tbm_module_ X-Git-Tag: accepted/tizen/unified/20210625.170433~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F260291%2F1;p=platform%2Fcore%2Fuifw%2Flibtbm.git tbm_module: change tbm_module_bufmgr_ to tbm_module_ Change-Id: If69b109fdc88d36c36f11349a97d1e334a0e8ae9 --- diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 56365ba..64f244c 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -313,7 +313,7 @@ _tbm_bufmgr_init(int fd, int server) _tbm_bufmgr_copy_module_data(gBufMgr, gBufMgr->module); /* check the essential capabilities of tbm_module */ - gBufMgr->capabilities = tbm_module_bufmgr_get_capabilities(gBufMgr->module, &error); + gBufMgr->capabilities = tbm_module_get_capabilities(gBufMgr->module, &error); if (gBufMgr->capabilities == TBM_BUFMGR_CAPABILITY_NONE) { TBM_ERR("The capabilities of the backend module is TBM_BUFMGR_CAPABILITY_NONE."); TBM_ERR("TBM_BUFMGR_CAPABILITY_SHARE_FD is the essential capability."); @@ -809,7 +809,7 @@ tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *native_display) TBM_BUFMGR_RETURN_VAL_IF_FAIL(TBM_BUFMGR_IS_VALID(bufmgr), 0); - error = tbm_module_bufmgr_bind_native_display(bufmgr->module, native_display); + error = tbm_module_bind_native_display(bufmgr->module, native_display); if (error != TBM_ERROR_NONE) { _tbm_set_last_result(error); _tbm_bufmgr_mutex_unlock(); @@ -913,10 +913,10 @@ tbm_bufmgr_internal_alloc_bo(tbm_bufmgr bufmgr, int size, int flags, tbm_error_e /* LCOV_EXCL_STOP */ } - bo_data = tbm_module_bufmgr_alloc_bo(bufmgr->module, bo, size, flags, error); + bo_data = tbm_module_alloc_bo(bufmgr->module, bo, size, flags, error); if (!bo_data) { /* LCOV_EXCL_START */ - TBM_ERR("tbm_module_bufmgr_alloc_bo failed. size:%d flags:%s error:%d", size, _tbm_flag_to_str(flags), *error); + TBM_ERR("tbm_module_alloc_bo failed. size:%d flags:%s error:%d", size, _tbm_flag_to_str(flags), *error); free(bo); return NULL; /* LCOV_EXCL_STOP */ @@ -954,7 +954,7 @@ tbm_bufmgr_internal_alloc_bo_with_format(tbm_bufmgr bufmgr, int format, int bo_i goto fail; } - bo->bo_data = tbm_module_bufmgr_alloc_bo_with_format(bufmgr->module, format, bo_idx, width, height, bpp, flags, error); + bo->bo_data = tbm_module_alloc_bo_with_format(bufmgr->module, format, bo_idx, width, height, bpp, flags, error); if (!bo->bo_data) { /* LCOV_EXCL_START */ _tbm_set_last_result(*error); @@ -1036,10 +1036,10 @@ tbm_bufmgr_internal_import_bo_with_key(tbm_bufmgr bufmgr, unsigned int key, tbm_ /* LCOV_EXCL_STOP */ } - bo->bo_data = tbm_module_bufmgr_import_bo_with_key(bufmgr->module, bo, key, error); + bo->bo_data = tbm_module_import_bo_with_key(bufmgr->module, bo, key, error); if (!bo->bo_data) { /* LCOV_EXCL_START */ - TBM_ERR("tbm_module_bufmgr_import_bo_with_key failed. tbm_key:%d", key); + TBM_ERR("tbm_module_import_bo_with_key failed. tbm_key:%d", key); free(bo); return NULL; /* LCOV_EXCL_STOP */ @@ -1083,10 +1083,10 @@ tbm_bufmgr_internal_import_bo_with_fd(tbm_bufmgr bufmgr, tbm_fd fd, tbm_error_e /* LCOV_EXCL_STOP */ } - bo->bo_data = tbm_module_bufmgr_import_bo_with_fd(bufmgr->module, bo, fd, error); + bo->bo_data = tbm_module_import_bo_with_fd(bufmgr->module, bo, fd, error); if (!bo->bo_data) { /* LCOV_EXCL_START */ - TBM_ERR("tbm_module_bufmgr_import_bo_with_fd failed. tbm_fd:%d", fd); + TBM_ERR("tbm_module_import_bo_with_fd failed. tbm_fd:%d", fd); free(bo); return NULL; /* LCOV_EXCL_STOP */ diff --git a/src/tbm_module.c b/src/tbm_module.c index f59d4c1..d4a2e9f 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -460,7 +460,7 @@ tbm_module_unload(tbm_module *module) } int -tbm_module_bufmgr_get_capabilities(tbm_module *module, tbm_error_e *error) +tbm_module_get_capabilities(tbm_module *module, tbm_error_e *error) { int capabilities = 0; tbm_backend_bufmgr_func *bufmgr_func = NULL; @@ -496,7 +496,7 @@ tbm_module_bufmgr_get_capabilities(tbm_module *module, tbm_error_e *error) } tbm_error_e -tbm_module_bufmgr_bind_native_display(tbm_module *module, void *native_display) +tbm_module_bind_native_display(tbm_module *module, void *native_display) { tbm_error_e error = TBM_ERROR_NONE; tbm_backend_bufmgr_func *bufmgr_func = NULL; @@ -559,7 +559,7 @@ tbm_module_bufmgr_bind_native_display(tbm_module *module, void *native_display) } tbm_error_e -tbm_module_bufmgr_get_supported_formats(tbm_module *module, uint32_t **formats, uint32_t *num) +tbm_module_get_supported_formats(tbm_module *module, uint32_t **formats, uint32_t *num) { tbm_error_e error = TBM_ERROR_NONE; tbm_backend_bufmgr_func *bufmgr_func = NULL; @@ -602,7 +602,7 @@ tbm_module_bufmgr_get_supported_formats(tbm_module *module, uint32_t **formats, } tbm_error_e -tbm_module_bufmgr_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_t w, uint32_t h, +tbm_module_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_t w, uint32_t h, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx) { tbm_error_e error = TBM_ERROR_NONE; @@ -645,7 +645,7 @@ tbm_module_bufmgr_get_plane_data(tbm_module *module, int format, int plane_idx, } tbm_backend_bo_data * -tbm_module_bufmgr_alloc_bo(tbm_module *module, tbm_bo bo, int size, int flags, tbm_error_e *error) +tbm_module_alloc_bo(tbm_module *module, tbm_bo bo, int size, int flags, tbm_error_e *error) { tbm_backend_bo_data *bo_data = NULL; tbm_backend_bufmgr_func *bufmgr_func = NULL; @@ -685,7 +685,7 @@ tbm_module_bufmgr_alloc_bo(tbm_module *module, tbm_bo bo, int size, int flags, t } tbm_backend_bo_data * -tbm_module_bufmgr_alloc_bo_with_format(tbm_module *module, int format, int bo_idx, int width, +tbm_module_alloc_bo_with_format(tbm_module *module, int format, int bo_idx, int width, int height, int bpp, tbm_bo_memory_type flags, tbm_error_e *error) { tbm_backend_bo_data *bo_data = NULL; @@ -728,7 +728,7 @@ tbm_module_bufmgr_alloc_bo_with_format(tbm_module *module, int format, int bo_id tbm_backend_bo_data * -tbm_module_bufmgr_import_bo_with_fd(tbm_module *module, tbm_bo bo, tbm_fd fd, tbm_error_e *error) +tbm_module_import_bo_with_fd(tbm_module *module, tbm_bo bo, tbm_fd fd, tbm_error_e *error) { tbm_backend_bo_data *bo_data = NULL; tbm_backend_bufmgr_func *bufmgr_func = NULL; @@ -771,7 +771,7 @@ tbm_module_bufmgr_import_bo_with_fd(tbm_module *module, tbm_bo bo, tbm_fd fd, tb } tbm_backend_bo_data * -tbm_module_bufmgr_import_bo_with_key(tbm_module *module, tbm_bo bo, tbm_key key, tbm_error_e *error) +tbm_module_import_bo_with_key(tbm_module *module, tbm_bo bo, tbm_key key, tbm_error_e *error) { tbm_backend_bo_data *bo_data = NULL; tbm_backend_bufmgr_func *bufmgr_func = NULL; diff --git a/src/tbm_module.h b/src/tbm_module.h index 92ac305..8c4bff4 100644 --- a/src/tbm_module.h +++ b/src/tbm_module.h @@ -72,14 +72,14 @@ typedef struct _tbm_module { tbm_module *tbm_module_load(int fd); void tbm_module_unload(tbm_module *module); -int tbm_module_bufmgr_get_capabilities(tbm_module *module, tbm_error_e *error); -tbm_error_e tbm_module_bufmgr_bind_native_display(tbm_module *module, void *native_display); -tbm_error_e tbm_module_bufmgr_get_supported_formats(tbm_module *module, uint32_t **formats, uint32_t *num); -tbm_error_e tbm_module_bufmgr_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_t w, uint32_t h, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx); -tbm_backend_bo_data *tbm_module_bufmgr_alloc_bo(tbm_module *module, tbm_bo bo, int size, int flags, tbm_error_e *error); -tbm_backend_bo_data *tbm_module_bufmgr_alloc_bo_with_format(tbm_module *module, int format, int bo_idx, int width, int height, int bpp, tbm_bo_memory_type flags, tbm_error_e *error); -tbm_backend_bo_data *tbm_module_bufmgr_import_bo_with_fd(tbm_module *module, tbm_bo bo, tbm_fd fd, tbm_error_e *error); -tbm_backend_bo_data *tbm_module_bufmgr_import_bo_with_key(tbm_module *module, tbm_bo bo, tbm_key key, tbm_error_e *error); +int tbm_module_get_capabilities(tbm_module *module, tbm_error_e *error); +tbm_error_e tbm_module_bind_native_display(tbm_module *module, void *native_display); +tbm_error_e tbm_module_get_supported_formats(tbm_module *module, uint32_t **formats, uint32_t *num); +tbm_error_e tbm_module_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_t w, uint32_t h, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx); +tbm_backend_bo_data *tbm_module_alloc_bo(tbm_module *module, tbm_bo bo, int size, int flags, tbm_error_e *error); +tbm_backend_bo_data *tbm_module_alloc_bo_with_format(tbm_module *module, int format, int bo_idx, int width, int height, int bpp, tbm_bo_memory_type flags, tbm_error_e *error); +tbm_backend_bo_data *tbm_module_import_bo_with_fd(tbm_module *module, tbm_bo bo, tbm_fd fd, tbm_error_e *error); +tbm_backend_bo_data *tbm_module_import_bo_with_key(tbm_module *module, tbm_bo bo, tbm_key key, tbm_error_e *error); void tbm_module_bo_free(tbm_module *module, tbm_bo bo, tbm_backend_bo_data *bo_data, int get_from_hal_surface); int tbm_module_bo_get_size(tbm_module *module, tbm_bo bo, tbm_backend_bo_data *bo_data, tbm_error_e *error); diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 0ed6da8..bf45028 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -328,7 +328,7 @@ _tbm_surface_internal_query_plane_data(tbm_surface_h surface, TBM_RETURN_VAL_IF_FAIL(surf->info.height > 0, 0); TBM_RETURN_VAL_IF_FAIL(surf->info.format > 0, 0); - error = tbm_module_bufmgr_get_plane_data(bufmgr->module, surf->info.format, plane_idx, surf->info.width, surf->info.height, size, offset, pitch, bo_idx); + error = tbm_module_get_plane_data(bufmgr->module, surf->info.format, plane_idx, surf->info.width, surf->info.height, size, offset, pitch, bo_idx); if (error != TBM_ERROR_NONE) { _tbm_set_last_result(error); return 0; @@ -1016,7 +1016,7 @@ tbm_surface_internal_query_supported_formats(uint32_t **formats, bufmgr = g_surface_bufmgr; - error = tbm_module_bufmgr_get_supported_formats(bufmgr->module, formats, num); + error = tbm_module_get_supported_formats(bufmgr->module, formats, num); if (error != TBM_ERROR_NONE) { _tbm_set_last_result(error); goto fail;