tbm_surface_queue_h
tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
+/**
+ * @brief Free a buffer queue for the window object
+ * @details Free buffer queue when the client no longer uses buferrs of queue.
+ * @param[in] hwc_window A window object
+ * @param[in] A tbm buffer queue
+ * @since 2.0.0
+ */
+void
+tdm_hwc_window_free_buffer_queue(tdm_hwc_window *hwc_window, tbm_surface_queue_h queue);
+
/**
* @brief Sets the desired composition type of the given window.
* @details During tdm_hwc_validate(), the device may request changes to
tbm_surface_queue_h (*hwc_window_get_buffer_queue)(tdm_hwc_window *hwc_window,
tdm_error *error);
+ /**
+ * @brief Free a buffer queue for the window object
+ * @details Free 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_free_buffer_queue)(tdm_hwc_window *hwc_window,
+ tbm_surface_queue_h queue);
+
/**
* @brief Sets the desired composition type of the given window.
* @details During hwc_validate(), the device may request changes to
return queue;
}
+EXTERN void
+tdm_hwc_window_free_buffer_queue(tdm_hwc_window *hwc_window, tbm_surface_queue_h queue)
+{
+ tdm_private_module *private_module;
+ tdm_func_hwc_window *func_hwc_window = NULL;
+ tdm_private_display *private_display;
+ tdm_private_output *private_output;
+ tdm_private_hwc *private_hwc;
+ tdm_private_hwc_window *private_hwc_window;
+
+ if (!hwc_window)
+ return;
+
+ private_hwc_window = (tdm_private_hwc_window *)hwc_window;
+ private_hwc = private_hwc_window->private_hwc;
+ private_output = private_hwc->private_output;
+ private_display = private_output->private_display;
+
+ TDM_RETURN_IF_FAIL(queue != NULL);
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ private_module = private_output->private_module;
+ func_hwc_window = &private_module->func_hwc_window;
+
+ if (!func_hwc_window->hwc_window_free_buffer_queue) {
+ _pthread_mutex_unlock(&private_display->lock);
+ TDM_WRN("not implemented!!");
+ return;
+ }
+
+ func_hwc_window->hwc_window_free_buffer_queue(private_hwc_window->hwc_window_backend, queue);
+
+ _pthread_mutex_unlock(&private_display->lock);
+
+ return;
+}
+
EXTERN tdm_error
tdm_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
tdm_hwc_window_composition composition_type)