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
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.
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
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.
/**
* @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