* Taeheon Kim <th908.kim@samsung.com>,
* YoungJun Cho <yj44.cho@samsung.com>,
* SooChan Lim <sc1.lim@samsung.com>,
- * Boram Park <sc1.lim@samsung.com>
+ * Boram Park <boram1288.park@samsung.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
#include "tdm_private.h"
+/* LCOV_EXCL_START */
+
#define COUNT_MAX 10
#define HWC_WINDOW_FUNC_ENTRY() \
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_get_tbm_buffer_queue) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
if (error)
*error = TDM_ERROR_NOT_IMPLEMENTED;
return NULL;
- /* LCOV_EXCL_STOP */
}
queue = func_hwc_window->hwc_window_get_tbm_buffer_queue(private_hwc_window->hwc_window_backend, error);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_set_composition_type) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_set_composition_type(private_hwc_window->hwc_window_backend, composition_type);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_set_buffer_damage) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_set_buffer_damage(private_hwc_window->hwc_window_backend, damage);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_set_info) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
if (info->src_config.format)
_pthread_mutex_lock(&private_display->lock);
if ((tdm_debug_dump & TDM_DUMP_FLAG_WINDOW) && buffer) {
- /* LCOV_EXCL_START */
char str[TDM_PATH_LEN];
static int i;
snprintf(str, TDM_PATH_LEN, "window_%d_%03d", private_output->index, i++);
tdm_helper_dump_buffer_str(buffer, tdm_debug_dump_dir, str);
- /* LCOV_EXCL_STOP */
}
private_module = private_output->private_module;
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_set_buffer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_set_buffer(private_hwc_window->hwc_window_backend, buffer);
func_hwc_window = &private_module->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);
if (!is_video) {
if (!func_output->output_hwc_create_window) {
- /* LCOV_EXCL_START */
if (error)
*error = TDM_ERROR_BAD_MODULE;
return NULL;
- /* LCOV_EXCL_STOP */
}
hwc_window_backend = func_output->output_hwc_create_window(
}
} else {
if (!func_output->output_hwc_create_video_window) {
- /* LCOV_EXCL_START */
if (error)
*error = TDM_ERROR_NOT_IMPLEMENTED;
return NULL;
- /* LCOV_EXCL_STOP */
}
hwc_window_backend = func_output->output_hwc_create_video_window(
private_hwc_window = calloc(1, sizeof(tdm_private_hwc_window));
if (!private_hwc_window) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: alloc memory");
func_output->output_hwc_destroy_window(private_output->output_backend, hwc_window_backend);
if (error)
*error = TDM_ERROR_OUT_OF_MEMORY;
return NULL;
- /* LCOV_EXCL_STOP */
}
LIST_ADD(&private_hwc_window->link, &private_output->hwc_window_list);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_set_flags) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_set_flags(private_hwc_window->hwc_window_backend, flags);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_unset_flags) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_unset_flags(private_hwc_window->hwc_window_backend, flags);
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_get_layer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
layer = func_hwc_window->hwc_window_get_layer(private_hwc_window->hwc_window_backend,
&ret);
if (!layer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("no assigned layer!!");
return TDM_ERROR_INVALID_PARAMETER;
- /* LCOV_EXCL_STOP */
}
private_layer = (tdm_private_layer*)layer;
else
ret = tdm_layer_unset_buffer_internal(private_layer);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: layer set buffer(window)");
- /* LCOV_EXCL_STOP */
+ _pthread_mutex_unlock(&private_display->lock);
return ret;
}
ret = func_hwc_window->hwc_window_get_info(private_hwc_window->hwc_window_backend,
&window_info);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: commit layer(window)");
- /* LCOV_EXCL_STOP */
+ _pthread_mutex_unlock(&private_display->lock);
return ret;
}
info_layer = (tdm_info_layer *)&window_info;
ret = tdm_layer_set_info_internal(private_layer, info_layer);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: layer set info(window)");
- /* LCOV_EXCL_STOP */
+ _pthread_mutex_unlock(&private_display->lock);
return ret;
}
hwc_window_commit_handler = calloc(1, sizeof(tdm_private_hwc_window_commit_handler));
if (!hwc_window_commit_handler) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: alloc memory");
+ _pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
}
hwc_window_commit_handler->private_hwc_window = private_hwc_window;
ret = tdm_layer_commit_internal(private_layer, _tdm_hwc_window_layer_commit_handler, hwc_window_commit_handler);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: commit layer(window)");
free(hwc_window_commit_handler);
- /* LCOV_EXCL_STOP */
+ _pthread_mutex_unlock(&private_display->lock);
return ret;
}
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_video_get_capability) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_video_get_capability(private_hwc_window->hwc_window_backend,
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_video_get_available_properties) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_video_get_available_properties(private_hwc_window->hwc_window_backend,
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_video_get_property) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_video_get_property(private_hwc_window->hwc_window_backend,
func_hwc_window = &private_module->func_hwc_window;
if (!func_hwc_window->hwc_window_video_set_property) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_hwc_window->hwc_window_video_set_property(private_hwc_window->hwc_window_backend,
return ret;
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file