TBM_BUFMGR_CAPABILITY_TBM_SYNC = (1 << 2), /**< Support tbm sync */
};
+/**
+ * @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
int tbm_bo_get_flags(tbm_bo bo);
/**
+ * @brief bind the native_display.
+ * @since_tizen 3.0
+ * @param[in] bufmgr : the buffer manager
+ * @param[in] native_display : the native_display
+ */
+int tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *native_display);
+
+/**
+ * @brief Initializes the buffer manager at the display server.
+ * @details use this api to initialize the tbm_bufmgr at the display server.
+ * @since_tizen 5.0
+ */
+tbm_bufmgr tbm_bufmgr_server_init(void);
+
+/**
+ * @brief Set the bo_lock_type of the bufffer manager.
+ * @details set the bo_lock_type
+ * @since_tizen 5.0
+ */
+int tbm_bufmgr_set_bo_lock_type(tbm_bufmgr bufmgr, tbm_bufmgr_bo_lock_type bo_lock_type);
+
+/**
* @brief Print out the information of tbm_bos.
* @since_tizen 3.0
* @param[in] bufmgr : the buffer manager
void tbm_bufmgr_debug_show(tbm_bufmgr bufmgr);
/**
+ * @brief Get string with the information of tbm_bos.
+ * @since_tizen 3.0
+ * @param[in] bufmgr : the buffer manager
+ * @return sting with info if this function succeeds, otherwise NULL. It has to be free by user.
+ */
+char * tbm_bufmgr_debug_tbm_info_get(tbm_bufmgr bufmgr);
+
+/**
* @brief Print out the trace of tbm_bos.
* @since_tizen 3.0
* @param[in] bufmgr : the buffer manager
*/
int tbm_bufmgr_debug_queue_dump(char *path, int count, int onoff);
-int tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *NativeDisplay);
+/**
+ * @brief Set scale factor for the nearest calling tbm_bufmgr_debug_dump_all() or tbm_bufmgr_debug_queue_dump()
+ * @since_tizen 3.0
+ * @param[in] scale : the scale factor, 0 - disable scaling
+ * @par Example
+ @code
+ #include <tbm_bufmgr.h>
+
+ // Dump all surface with scale factor 0.5
+ tbm_bufmgr_debug_dump_set_scale(0.5);
+ tbm_bufmgr_debug_dump_all("/tmp/");
+
+ // Start the dump debugging for queue with scale factor 0.5
+ tbm_bufmgr_debug_dump_set_scale(0.2);
+ tbm_bufmgr_debug_queue_dump("/tmp/", 10, 1);
+
+ @endcode
+ */
+void tbm_bufmgr_debug_dump_set_scale(double scale);
+
+/**
+ * @brief Get ref_count of a global tbm_bufmgr
+ * @since_tizen 5.0
+ */
+int tbm_bufmgr_debug_get_ref_count(void);
#ifdef __cplusplus
}