tdm_hwc_window *(*hwc_create_window)(tdm_hwc *hwc, tdm_error *error);
/**
- * @brief Get the supported format array for the hwc windows of a hwc object.
+ * @brief Get video the supported format array for the hwc windows of a hwc object.
* @param[in] hwc A hwc object
* @param[out] formats The available format array
* @param[out] count The count of formats
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*hwc_get_supported_formats)(tdm_hwc *hwc, const tbm_format **formats,
+ tdm_error (*hwc_get_video_supported_formats)(tdm_hwc *hwc, const tbm_format **formats,
int *count);
-
+ /**
+ * @brief Get the hwc video capability
+ * @param[in] hwc A hwc object
+ * @param[out] video_capability A hwc hwc video capability
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_get_video_capability)(tdm_hwc *hwc,
+ tdm_hwc_video_capability *video_capability);
/**
* @brief Get the available property array of a hwc object.
* @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
* @return A buffer queue
*/
- tbm_surface_queue_h (*hwc_window_get_buffer_queue)(tdm_hwc_window *hwc_window,
- tdm_error *error);
+ tbm_surface_queue_h (*hwc_window_acquire_buffer_queue)(tdm_hwc_window *hwc_window,
+ tdm_error *error);
+
+ /**
+ * @brief Release a buffer queue for the window object
+ * @details Release buffer queue when the client no longer uses buferrs of queue.
+ * @param[in] hwc_window A window object
+ * @param[in] A tbm buffer queue
+ */
+ void (*hwc_window_release_buffer_queue)(tdm_hwc_window *hwc_window,
+ tbm_surface_queue_h queue);
/**
* @brief Sets the desired composition type of the given window.
*/
tdm_error (*hwc_window_get_property)(tdm_hwc_window *hwc_window,
uint32_t id, tdm_value *value);
+
+ /**
+ * @brief Get the preperation type of hwc_window
+ * @param[in] hwc window A hwc window object
+ * @param[out] preperation_types The tdm_hwc_window_preparation types
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+ tdm_error (*hwc_window_get_preparation_types)(tdm_hwc_window *hwc_window,
+ int *preperation_types);
} tdm_func_hwc_window;
/**
(((major) << 16) & TDM_BACKEND_MAJOR_VERSION_MASK) | \
((minor) & TDM_BACKEND_MINOR_VERSION_MASK)
+
+#define TDM_BACKEND_ABI_VERSION_1_0 TDM_BACKEND_SET_ABI_VERSION(1, 0)
+#define TDM_BACKEND_ABI_VERSION_2_0 TDM_BACKEND_SET_ABI_VERSION(2, 0)
+#define TDM_BACKEND_ABI_LATEST_VERSION TDM_BACKEND_ABI_VERSION_2_0 /**< the latest version of the tdm backend abi */
+
/**
* @brief
* This MACRO is deprecated since 1.2.0. Use TDM_BACKEND_SET_ABI_VERSION instead of this.
tdm_backend_register_func_layer(tdm_display *dpy, tdm_func_layer *func_layer);
/**
+ * @brief Register the backend hwc functions to a display
+ * @param[in] dpy A display object
+ * @param[in] func_hwc hwc functions
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ * @see tdm_backend_register_func_display, tdm_backend_register_func_output
+ * @remarks
+ * A backend module @b SHOULD set the backend hwc functions at least.
+ * @since 2.0.0
+ */
+tdm_error
+tdm_backend_register_func_hwc(tdm_display *dpy, tdm_func_hwc *func_hwc);
+
+/**
* @brief Register the backend hwc_window functions to a display
* @param[in] dpy A display object
* @param[in] func_hwc_window hwc_window functions