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
tbm_surface_h buffer);
/**
+ * @brief Unset a TDM buffer to a window object
+ * @details A TDM 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.
+ *
+ * Implementation should return #TDM_ERROR_BUSY if #hwc_window can't
+ * be updated right now, this won't be interpreted like some critical
+ * error.
+ */
+ tdm_error (*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
return ret;
}
+EXTERN tdm_error
+tdm_hwc_window_unset_buffer(tdm_hwc_window *hwc_window)
+{
+ tdm_func_hwc_window *func_hwc_window;
+
+ HWC_WINDOW_FUNC_ENTRY();
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ func_hwc_window = &private_display->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_unset_buffer) {
+ /* LCOV_EXCL_START */
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_ERR("not implemented!!");
+ return TDM_ERROR_NOT_IMPLEMENTED;
+ /* LCOV_EXCL_STOP */
+ }
+
+ ret = func_hwc_window->hwc_window_unset_buffer(private_hwc_window->hwc_window_backend);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return ret;
+}
+
INTERN tdm_hwc_window *
tdm_hwc_window_create_internal(tdm_private_output *private_output, int is_video,
tdm_error *error)