From 91c93c7fa00818502a418f29fa6559f27f11a0e0 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Tue, 6 Mar 2018 19:28:29 +0900 Subject: [PATCH] backend: change the symbol position at struct _tbm_bufmgr_backend Change-Id: I22b06df5c25370eff7861f2fd936a8182620af8d --- src/tbm_bufmgr_backend.h | 104 +++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/src/tbm_bufmgr_backend.h b/src/tbm_bufmgr_backend.h index c543c4a..965644a 100644 --- a/src/tbm_bufmgr_backend.h +++ b/src/tbm_bufmgr_backend.h @@ -81,11 +81,12 @@ struct _tbm_bufmgr_backend { void (*bufmgr_deinit)(void *priv); /** - * @brief get the size of a bo. - * @param[in] bo : the buffer object - * @return size if this function succeeds, otherwise 0. + * @brief get(bind) the native display + * @param[in] bufmgr : the buffer object + * @param[in] native_display : the native display + * @return 1 if this function succeeds, otherwise 0. */ - int (*bo_size)(tbm_bo bo); + int (*bufmgr_bind_native_display)(tbm_bufmgr bufmgr, void *native_display); /** * @brief allocate the buffer object @@ -103,23 +104,19 @@ struct _tbm_bufmgr_backend { void (*bo_free)(tbm_bo bo); /** - * @brief import the buffer object associated with the key. - * @remarks If the backend doesn't support a buffer sharing by tbm key, - fucntion pointer must be set to NULL. + * @brief get the size of a bo. * @param[in] bo : the buffer object - * @param[in] key : the key associated with the buffer object - * @return pointer of the bo private. + * @return size if this function succeeds, otherwise 0. */ - void *(*bo_import)(tbm_bo bo, unsigned int key); + int (*bo_size)(tbm_bo bo); /** - * @brief export the buffer object - * @remarks If the backend doesn't support a buffer sharing by tbm key, - fucntion pointer must be set to NULL. + * @brief get the tbm flags of memory type * @param[in] bo : the buffer object - * @return key associated with the buffer object + * @see #TBM_BO_FLAGS + * @return tbm flags of memory type is this function succeeds, otherwise 0. */ - unsigned int (*bo_export)(tbm_bo bo); + int (*bo_get_flags)(tbm_bo bo); /** * @brief get the tbm_bo_handle according to the device type. @@ -146,14 +143,6 @@ struct _tbm_bufmgr_backend { int (*bo_unmap)(tbm_bo bo); /** - * @brief unlock the buffer object. - * @param[in] bo : the buffer object - * @return 1 if this function succeeds, otherwise 0. - * @remark This function pointer could be null. (default: use the tizen global lock) - */ - int (*bo_unlock)(tbm_bo bo); - - /** * @brief lock the buffer object with a device and an opt. * @param[in] bo : the buffer object * @param[in] device : the device type to get a handle @@ -164,28 +153,22 @@ struct _tbm_bufmgr_backend { int (*bo_lock)(tbm_bo bo, int device, int opt); /** - * @brief query the formats list and the num to be supported by backend. - * @param[out] **formats : format array list. this array has to be allocated by backend funtion - * @param[out] *num : the number of the formats to be supported by backend + * @brief unlock the buffer object. + * @param[in] bo : the buffer object * @return 1 if this function succeeds, otherwise 0. + * @remark This function pointer could be null. (default: use the tizen global lock) */ - int (*surface_supported_format)(uint32_t **formats, uint32_t *num); + int (*bo_unlock)(tbm_bo bo); /** - * @brief get the plane data of the surface. - * @param[in] width : the width of the surface - * @param[in] height : the height of the surface - * @param[in] format : the format of the surface - * @param[in] plane_idx : the format of the surface - * @param[out] size : the size of the plane - * @param[out] offset : the offset of the plane - * @param[out] pitch : the pitch of the plane - * @param[out] bo_idx : the bo index of the plane - * @return 1 if this function succeeds, otherwise 0. + * @brief export the buffer object + * @remarks tbm_fd must be free by user. + * @remarks If the backend doesn't support a buffer sharing by tbm fd, + fucntion pointer must be set to NULL. + * @param[in] bo : the buffer object + * @return tbm_fd associated with the buffer object */ - int (*surface_get_plane_data)(int width, int height, - tbm_format format, int plane_idx, uint32_t *size, uint32_t *offset, - uint32_t *pitch, int *bo_idx); + tbm_fd (*bo_export_fd)(tbm_bo bo); /** * @brief import the buffer object associated with the prime fd. @@ -200,29 +183,46 @@ struct _tbm_bufmgr_backend { /** * @brief export the buffer object - * @remarks tbm_fd must be free by user. - * @remarks If the backend doesn't support a buffer sharing by tbm fd, + * @remarks If the backend doesn't support a buffer sharing by tbm key, fucntion pointer must be set to NULL. * @param[in] bo : the buffer object - * @return tbm_fd associated with the buffer object + * @return key associated with the buffer object */ - tbm_fd (*bo_export_fd)(tbm_bo bo); + unsigned int (*bo_export)(tbm_bo bo); /** - * @brief get the tbm flags of memory type + * @brief import the buffer object associated with the key. + * @remarks If the backend doesn't support a buffer sharing by tbm key, + fucntion pointer must be set to NULL. * @param[in] bo : the buffer object - * @see #TBM_BO_FLAGS - * @return tbm flags of memory type is this function succeeds, otherwise 0. + * @param[in] key : the key associated with the buffer object + * @return pointer of the bo private. */ - int (*bo_get_flags)(tbm_bo bo); + void *(*bo_import)(tbm_bo bo, unsigned int key); /** - * @brief get(bind) the native display - * @param[in] bufmgr : the buffer object - * @param[in] native_display : the native display + * @brief query the formats list and the num to be supported by backend. + * @param[out] **formats : format array list. this array has to be allocated by backend funtion + * @param[out] *num : the number of the formats to be supported by backend * @return 1 if this function succeeds, otherwise 0. */ - int (*bufmgr_bind_native_display)(tbm_bufmgr bufmgr, void *native_display); + int (*surface_supported_format)(uint32_t **formats, uint32_t *num); + + /** + * @brief get the plane data of the surface. + * @param[in] width : the width of the surface + * @param[in] height : the height of the surface + * @param[in] format : the format of the surface + * @param[in] plane_idx : the format of the surface + * @param[out] size : the size of the plane + * @param[out] offset : the offset of the plane + * @param[out] pitch : the pitch of the plane + * @param[out] bo_idx : the bo index of the plane + * @return 1 if this function succeeds, otherwise 0. + */ + int (*surface_get_plane_data)(int width, int height, + tbm_format format, int plane_idx, uint32_t *size, uint32_t *offset, + uint32_t *pitch, int *bo_idx); /** * @brief allocate the buffer object for tbm surface -- 2.7.4