From: Changyeon Lee Date: Wed, 7 Aug 2024 07:09:14 +0000 (+0900) Subject: Remove debug and deprecated header in tbm_type_common.h X-Git-Tag: accepted/tizen/unified/20240809.055134~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=555691d378722a84d4a42c55e74973504e3f3143;p=platform%2Fcore%2Fuifw%2Flibtbm.git Remove debug and deprecated header in tbm_type_common.h Change-Id: I0523a9bf5d3e549d8e2be116b39ee2a6f2265890 --- diff --git a/include/tbm_backend.h b/include/tbm_backend.h index 5a27483..c9e8ffb 100644 --- a/include/tbm_backend.h +++ b/include/tbm_backend.h @@ -95,6 +95,24 @@ typedef struct _tbm_backend_bufmgr_func tbm_backend_bufmgr_func; */ typedef struct _tbm_backend_bo_func tbm_backend_bo_func; +/** + * @brief Definition for native display (wl_display in tizen) + * @since_tizen 5.0 + */ +typedef void tbm_native_display; + +/** + * @brief Enumeration of tbm buffer manager capability. + * @since_tizen 5.0 + */ +typedef enum TBM_BUFMGR_CAPABILITY tbm_bufmgr_capability; + +/** + * @brief Enumeration of tbm bo memory type. + * @since_tizen 5.0 + */ +typedef enum TBM_BO_FLAGS tbm_bo_memory_type; + /** * @brief The bufmgr functions for a backend module. */ diff --git a/include/tbm_bufmgr_internal.h b/include/tbm_bufmgr_internal.h index 5c79e5e..2064b93 100644 --- a/include/tbm_bufmgr_internal.h +++ b/include/tbm_bufmgr_internal.h @@ -42,6 +42,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * \brief Tizen Buffer Manager Internal */ +/** + * @brief Enumeration of buffer manager lock try for bo + * @since_tizen 5.0 + */ +typedef enum { + TBM_BUFMGR_BO_LOCK_TYPE_NEVER = 0, /**< the bufmgr do not try to lock the bos when the tbm_bo_map is called. */ + TBM_BUFMGR_BO_LOCK_TYPE_ONCE, /**< the bufmgr tries to lock the bos only once when the tbm_bo_map is called. */ + TBM_BUFMGR_BO_LOCK_TYPE_ALWAYS, /**< the bufmgr always tries to lock the bos when the tbm_bo_map is called. */ +} tbm_bufmgr_bo_lock_type; + #ifdef __cplusplus extern "C" { #endif diff --git a/include/tbm_debug.h b/include/tbm_debug.h index 735632b..f5c6789 100644 --- a/include/tbm_debug.h +++ b/include/tbm_debug.h @@ -41,6 +41,52 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * \file tbm_debug.h */ +/** + * @brief Enumeration of the trace log for debug + * @since_tizen 5.0 + */ +typedef enum { + TBM_BUFGMR_DEBUG_TRACE_NONE = 0, + TBM_BUFGMR_DEBUG_TRACE_BO = (1 << 0), + TBM_BUFGMR_DEBUG_TRACE_SURFACE_INTERNAL = (1 << 1), + TBM_BUFGMR_DEBUG_TRACE_SURFACE = (1 << 2), + TBM_BUFGMR_DEBUG_TRACE_SURFACE_QUEUE = (1 << 3), +} tbm_bufmgr_debug_trace_mask; + +/* type to string ***********************************************************/ +struct tbm_type_name { + int type; + const char *name; +}; + +#define TBM_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + +#define TBM_TYPE_NAME_FN(res) \ +static inline const char * tbm_##res##_str(int type) \ +{ \ + unsigned int i; \ + for (i = 0; i < TBM_ARRAY_SIZE(tbm_##res##_names); i++) { \ + if (tbm_##res##_names[i].type == type) \ + return tbm_##res##_names[i].name; \ + } \ + return "(invalid)"; \ +} + +static struct tbm_type_name tbm_error_names[] = { + { TBM_ERROR_NONE, "TBM_ERROR_NONE" }, + { TBM_ERROR_OUT_OF_MEMORY, "TBM_ERROR_OUT_OF_MEMORY" }, + { TBM_ERROR_INVALID_PARAMETER, "TBM_ERROR_INVALID_PARAMETER" }, + { TBM_ERROR_INVALID_OPERATION, "TBM_ERROR_INVALID_OPERATION" }, + { TBM_ERROR_NOT_SUPPORTED, "TBM_ERROR_NOT_SUPPORTED" }, + { TBM_SURFACE_QUEUE_ERROR_EMPTY, "TBM_SURFACE_QUEUE_ERROR_EMPTY" }, + { TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE, "TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE" }, + { TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE, "TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE" }, + { TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED, "TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED" }, + { TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST, "TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST" }, + { TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE, "TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE" }, +}; +TBM_TYPE_NAME_FN(error) + #ifdef __cplusplus extern "C" { #endif diff --git a/include/tbm_type_common.h b/include/tbm_type_common.h index bb023fd..0058580 100644 --- a/include/tbm_type_common.h +++ b/include/tbm_type_common.h @@ -69,12 +69,6 @@ typedef uint32_t tbm_key; */ typedef int32_t tbm_fd; -/** - * @brief Definition for native display (wl_display in tizen) - * @since_tizen 5.0 - */ -typedef void tbm_native_display; - /* TBM_DEVICE_TYPE */ /** @@ -216,72 +210,4 @@ typedef struct _tbm_surface_buffer_data { */ typedef void (*tbm_data_free) (void *user_data); -/** - * @brief Enumeration of tbm buffer manager capability. - * @since_tizen 5.0 - */ -typedef enum TBM_BUFMGR_CAPABILITY tbm_bufmgr_capability; - -/** - * @brief Enumeration of tbm bo memory type. - * @since_tizen 5.0 - */ -typedef enum TBM_BO_FLAGS tbm_bo_memory_type; - -/** - * @brief Enumeration of buffer manager lock try for bo - * @since_tizen 5.0 - */ -typedef enum { - TBM_BUFMGR_BO_LOCK_TYPE_NEVER = 0, /**< the bufmgr do not try to lock the bos when the tbm_bo_map is called. */ - TBM_BUFMGR_BO_LOCK_TYPE_ONCE, /**< the bufmgr tries to lock the bos only once when the tbm_bo_map is called. */ - TBM_BUFMGR_BO_LOCK_TYPE_ALWAYS, /**< the bufmgr always tries to lock the bos when the tbm_bo_map is called. */ -} tbm_bufmgr_bo_lock_type; - -/** - * @brief Enumeration of the trace log for debug - * @since_tizen 5.0 - */ -typedef enum { - TBM_BUFGMR_DEBUG_TRACE_NONE = 0, - TBM_BUFGMR_DEBUG_TRACE_BO = (1 << 0), - TBM_BUFGMR_DEBUG_TRACE_SURFACE_INTERNAL = (1 << 1), - TBM_BUFGMR_DEBUG_TRACE_SURFACE = (1 << 2), - TBM_BUFGMR_DEBUG_TRACE_SURFACE_QUEUE = (1 << 3), -} tbm_bufmgr_debug_trace_mask; - -/* type to string ***********************************************************/ -struct tbm_type_name { - int type; - const char *name; -}; - -#define TBM_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - -#define TBM_TYPE_NAME_FN(res) \ -static inline const char * tbm_##res##_str(int type) \ -{ \ - unsigned int i; \ - for (i = 0; i < TBM_ARRAY_SIZE(tbm_##res##_names); i++) { \ - if (tbm_##res##_names[i].type == type) \ - return tbm_##res##_names[i].name; \ - } \ - return "(invalid)"; \ -} - -static struct tbm_type_name tbm_error_names[] = { - { TBM_ERROR_NONE, "TBM_ERROR_NONE" }, - { TBM_ERROR_OUT_OF_MEMORY, "TBM_ERROR_OUT_OF_MEMORY" }, - { TBM_ERROR_INVALID_PARAMETER, "TBM_ERROR_INVALID_PARAMETER" }, - { TBM_ERROR_INVALID_OPERATION, "TBM_ERROR_INVALID_OPERATION" }, - { TBM_ERROR_NOT_SUPPORTED, "TBM_ERROR_NOT_SUPPORTED" }, - { TBM_SURFACE_QUEUE_ERROR_EMPTY, "TBM_SURFACE_QUEUE_ERROR_EMPTY" }, - { TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE, "TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE" }, - { TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE, "TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE" }, - { TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED, "TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED" }, - { TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST, "TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST" }, - { TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE, "TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE" }, -}; -TBM_TYPE_NAME_FN(error) - #endif /* _TBM_TYPE_COMMON_H_ */