hwc: add tdm_output_hwc_commit_client_target_buffer
[platform/core/uifw/libtdm.git] / include / tdm.h
index 7aee6b8..f90fbe8 100644 (file)
@@ -635,6 +635,28 @@ tdm_error
 tdm_output_hwc_set_client_target_buffer(tdm_output *output, tbm_surface_h target_buffer, tdm_hwc_region damage);
 
 /**
+ * @brief Unset the client(relative to the TDM) target buffer
+ * @details TODO
+ * @param[in] output A output object
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ * @since 2.0.0
+ */
+tdm_error
+tdm_output_hwc_unset_client_target_buffer(tdm_output *output);
+
+/**
+ * @brief Commit changes for a target_window
+ * @details After all change of a window object are applied, a user commit handler
+ * will be called.
+ * @param[in] hwc_window A window object
+ * @param[in] func A user commit handler
+ * @param[in] user_data The user data
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_output_hwc_commit_client_target_buffer(tdm_output *output, tdm_output_hwc_target_buffer_commit_handler func, void *user_data);
+
+/**
  * @brief Validate the output
  * @details Instructs the device to inspect all of the layer state and
  * determine if there are any composition type changes necessary before
@@ -974,17 +996,6 @@ tbm_surface_queue_h
 tdm_hwc_window_get_tbm_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
 
 /**
- * @brief Sets the desired Z order of the given window. A window with
- * a greater Z value occludes a window with a lesser Z value.
- * @param[in] hwc_window A window object
- * @param[in] z the new Z order
- * @return #TDM_ERROR_NONE if success. Otherwise, error value.
- * @since 2.0.0
- */
-tdm_error
-tdm_hwc_window_set_zpos(tdm_hwc_window *hwc_window, int32_t zpos);
-
-/**
  * @brief Sets the desired composition type of the given window.
  * @details During tdm_output_hwc_validate(), the device may request changes to
  * the composition types of any of the layers as described in the definition
@@ -1050,6 +1061,20 @@ tdm_error
 tdm_hwc_window_set_buffer(tdm_hwc_window *hwc_window, tbm_surface_h buffer);
 
 /**
+ * @brief Unset a TBM buffer to a window object
+ * @details A TBM buffer will be applied when the output object of a layer
+ * object is committed.
+ * @param[in] hwc_window A window object
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ * @return #TDM_ERROR_BUSY if #hwc_window can't be updated right now, this
+ * can happen if #hwc_window is involved in the smooth transition from
+ * DEVICE to CLIENT, this shouldn't be interpreted like some critical error.
+ * @since 2.0.0
+ */
+tdm_error
+tdm_hwc_window_unset_buffer(tdm_hwc_window *hwc_window);
+
+/**
  * @brief Set a flags to a window object
  * @param[in] hwc_window A window object
  * @param[in] flags A hwc_window flags
@@ -1070,6 +1095,18 @@ tdm_error
 tdm_hwc_window_unset_flags(tdm_hwc_window *hwc_window, tdm_hwc_window_flag flags);
 
 /**
+ * @brief Commit changes for a window object
+ * @details After all change of a window object are applied, a user commit handler
+ * will be called.
+ * @param[in] hwc_window A window object
+ * @param[in] func A user commit handler
+ * @param[in] user_data The user data
+ * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+ */
+tdm_error
+tdm_hwc_window_commit(tdm_hwc_window *hwc_window, tdm_hwc_window_commit_handler func, void *user_data);
+
+/**
  * @brief Get the available property array  of a video hwc window object.
  * @param[in] hwc window A video hwc window object
  * @param[out] props The available property array