}
}
-/* tbm_surface_queue_h tdm_hwc_window_get_buffer_queue() */
+/* tbm_surface_queue_h tdm_hwc_window_acquire_buffer_queue() */
TEST_P(TDMHwcWindow, GetBufferQueueFailNull)
{
TDM_UT_SKIP_FLAG(has_outputs);
tdm_error error = TDM_ERROR_NONE;
tbm_surface_queue_h queue = NULL;
- queue = tdm_hwc_window_get_buffer_queue(NULL, &error);
+ queue = tdm_hwc_window_acquire_buffer_queue(NULL, &error);
ASSERT_NE(TDM_ERROR_NONE, error);
ASSERT_EQ(NULL, queue);
- queue = tdm_hwc_window_get_buffer_queue(NULL, NULL);
+ queue = tdm_hwc_window_acquire_buffer_queue(NULL, NULL);
ASSERT_EQ(NULL, queue);
}
error = tdm_hwc_window_set_info(hwc_wins[w], &info);
ASSERT_EQ(TDM_ERROR_NONE, error);
- queue = tdm_hwc_window_get_buffer_queue(hwc_wins[w], &error);
- tbm_surface_queue_destroy(queue);
+ queue = tdm_hwc_window_acquire_buffer_queue(hwc_wins[w], &error);
+ tdm_hwc_window_release_buffer_queue(hwc_wins[w], queue);
ASSERT_EQ(TDM_ERROR_NONE, error);
ASSERT_NE(NULL, queue);
- queue = tdm_hwc_window_get_buffer_queue(hwc_wins[w], NULL);
- tbm_surface_queue_destroy(queue);
+ queue = tdm_hwc_window_acquire_buffer_queue(hwc_wins[w], NULL);
+ tdm_hwc_window_release_buffer_queue(hwc_wins[w], queue);
ASSERT_NE(NULL, queue);
}
tdm_hwc_window_destroy(tdm_hwc_window *hwc_window);
/**
- * @brief Get a buffer queue for the window object
+ * @brief Acquire a buffer queue for the window object
* @details These buffers are used to composite by hardware a client content in
* the nocomp mode.
* @param[in] hwc_window A window object
* @since 2.0.0
*/
tbm_surface_queue_h
-tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
+tdm_hwc_window_acquire_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
/**
* @brief Release a buffer queue for the window 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
/** If the client needs to render to a specific buffer for compositing
* with TDM_COMPOSITION_DEVICE, Set TDM_PREPARATION_BUFFER_QUEUE type to hwc_window.
* The client will render next frame on buffers of queue which got by
- * tdm_hwc_window_get_buffer_queue.
+ * tdm_hwc_window_acquire_buffer_queue.
*/
TDM_PREPARATION_BUFFER_QUEUE = (1 << 0),
} tdm_hwc_window_preparation;
}
EXTERN tbm_surface_queue_h
-tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
+tdm_hwc_window_acquire_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
{
tdm_private_module *private_module;
tdm_func_hwc_window *func_hwc_window = NULL;
private_module = private_output->private_module;
func_hwc_window = &private_module->func_hwc_window;
- if (!func_hwc_window->hwc_window_get_buffer_queue) {
+ if (!func_hwc_window->hwc_window_acquire_buffer_queue) {
/* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return NULL;
}
- queue = func_hwc_window->hwc_window_get_buffer_queue(private_hwc_window->hwc_window_backend, error);
+ queue = func_hwc_window->hwc_window_acquire_buffer_queue(private_hwc_window->hwc_window_backend, error);
_pthread_mutex_unlock(&private_display->lock);