typedef struct _hal_tbm_backend_data hal_tbm_backend_data;
typedef struct _hal_tbm_bufmgr_funcs hal_tbm_bufmgr_funcs;
+typedef struct _hal_tbm_surface_funcs hal_tbm_surface_funcs;
typedef struct _hal_tbm_bo_funcs hal_tbm_bo_funcs;
typedef hal_tbm_error (*hal_tbm_authenticated_drm_fd_handler)(hal_tbm_fd auth_fd, void *user_data);
} drm_info;
hal_tbm_bufmgr_funcs *bufmgr_funcs;
+ hal_tbm_surface_funcs *surface_funcs;
hal_tbm_bo_funcs *bo_funcs;
};
hal_tbm_bo_memory_type mem_types, hal_tbm_error *error);
hal_tbm_bo *(*bufmgr_import_fd)(hal_tbm_bufmgr *bufmgr, hal_tbm_fd fd, hal_tbm_error *error);
hal_tbm_bo *(*bufmgr_import_key)(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error *error);
+ hal_tbm_surface *(*bufmgr_alloc_surface)(hal_tbm_bufmgr *bufmgr, int width, int height, hal_tbm_format format, hal_tbm_error *error);
+ hal_tbm_surface *(*bufmgr_import_surface)(hal_tbm_bufmgr *bufmgr, int width, int height, hal_tbm_format format, hal_tbm_surface_buffer_data *buffer_data, hal_tbm_error *error);
+};
+
+struct _hal_tbm_surface_funcs {
+ void (*surface_free) (hal_tbm_surface *surface);
+ hal_tbm_bo **(*surface_get_bos)(hal_tbm_surface *surface, int *num_bos, hal_tbm_error *error);
+ hal_tbm_error (*surface_get_plane_data)(hal_tbm_surface *surface, int plane_idx, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx);
+ hal_tbm_surface_buffer_data *(*surface_export)(hal_tbm_surface *surface, hal_tbm_error *error);
};
struct _hal_tbm_bo_funcs {
};
/**
+ * @brief Deficitino for the buffer data of hal_tbm_surface
+ */
+typedef struct _hal_tbm_surface_buffer_data {
+ int *fds; /**< an array of dmabuf fds */
+ unsigned int num_fds; /**< the number of dmabuf fds */
+ int *meta_data; /**< an array of meta data */
+ unsigned int num_meta_data; /**< the number of meta data */
+ void *reserved1; /**< reserved data1 */
+ void *reserved2; /**< reserved data2 */
+} hal_tbm_surface_buffer_data;
+
+/**
* @brief hal_tbm_bo_handle abstraction of the memory handle by HAL_TBM_DEVICE_TYPE
*/
typedef union _hal_tbm_bo_handle {
typedef void hal_tbm_bufmgr;
/**
+ * @brief Definition for the tizen surface object
+ */
+typedef void hal_tbm_surface;
+
+/**
* @brief Definition for the tizen buffer object
*/
typedef void hal_tbm_bo;