return capture;
}
+/* LCOV_EXCL_START */
EXTERN tdm_hwc_window *
tdm_output_hwc_create_window(tdm_output *output, tdm_error *error)
{
if (private_output->caps.capabilities & TDM_OUTPUT_CAPABILITY_HWC)
hwc_window = (tdm_hwc_window *)tdm_hwc_window_create_internal(private_output, 0, error);
else {
- /* LCOV_EXCL_START */
TDM_ERR("output(%p) not support HWC", private_output);
if (error)
*error = TDM_ERROR_BAD_REQUEST;
- /* LCOV_EXCL_STOP */
}
_pthread_mutex_unlock(&private_display->lock);
if (private_output->caps.capabilities & TDM_OUTPUT_CAPABILITY_HWC)
hwc_window = (tdm_hwc_window *)tdm_hwc_window_create_internal(private_output, 1, error);
else {
- /* LCOV_EXCL_START */
TDM_ERR("output(%p) not support HWC", private_output);
if (error)
*error = TDM_ERROR_BAD_REQUEST;
- /* LCOV_EXCL_STOP */
}
_pthread_mutex_unlock(&private_display->lock);
func_output = &private_module->func_output;
if (!func_output->output_hwc_validate) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
if (num_wnds == 0) {
composited_wnds_backend = calloc(num_wnds, sizeof(tdm_hwc_window *));
if (!composited_wnds_backend) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
}
composited_wnds_frontend = (tdm_private_hwc_window **)composited_wnds;
func_output = &private_module->func_output;
if (!func_output->output_hwc_get_changed_composition_types) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_get_changed_composition_types(private_output->output_backend,
num_elements, hwc_window, composition_types);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
return ret;
- /* LCOV_EXCL_STOP */
}
if (hwc_window == NULL || composition_types == NULL) {
private_hwc_window = _tdm_output_find_private_hwc_window(private_output, hwc_window[i]);
if (private_hwc_window == NULL) {
- /* LCOV_EXCL_START */
TDM_ERR("failed! This should never happen!");
func_output->output_hwc_destroy_window(private_output->output_backend, hwc_window[i]);
*num_elements = 0;
_pthread_mutex_unlock(&private_display->lock);
return TDM_ERROR_OPERATION_FAILED;
- /* LCOV_EXCL_STOP */
}
hwc_window[i] = (tdm_hwc_window*)private_hwc_window;
func_output = &private_module->func_output;
if (!func_output->output_hwc_validate) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_accept_changes(private_output->output_backend);
func_output = &private_module->func_output;
if (!func_output->output_hwc_get_target_buffer_queue) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return NULL;
- /* LCOV_EXCL_STOP */
}
queue = func_output->output_hwc_get_target_buffer_queue(private_output->output_backend, error);
}
if (tdm_debug_dump & TDM_DUMP_FLAG_WINDOW) {
- /* LCOV_EXCL_START */
char str[TDM_PATH_LEN];
static int i;
snprintf(str, TDM_PATH_LEN, "target_window_%d_%03d",
private_output->index, i++);
tdm_helper_dump_buffer_str(target_buffer, tdm_debug_dump_dir, str);
- /* LCOV_EXCL_STOP */
}
private_module = private_output->private_module;
func_output = &private_module->func_output;
if (!func_output->output_hwc_set_client_target_buffer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_set_client_target_buffer(private_output->output_backend, target_buffer, damage);
func_output = &private_module->func_output;
if (!func_output->output_hwc_unset_client_target_buffer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_unset_client_target_buffer(private_output->output_backend);
func_output = &private_module->func_output;
if (!func_output->output_hwc_get_client_target_buffer_layer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
layer = func_output->output_hwc_get_client_target_buffer_layer(private_output->output_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;
if (!func_output->output_hwc_get_client_target_buffer) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
buffer = func_output->output_hwc_get_client_target_buffer(private_output->output_backend,
else
ret = tdm_layer_unset_buffer_internal(private_layer);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: layer set info(window)");
_pthread_mutex_unlock(&private_display->lock);
- /* LCOV_EXCL_STOP */
return ret;
}
ret = tdm_layer_set_info_internal(private_layer, &private_output->target_buffer_info);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: layer set info(window)");
_pthread_mutex_unlock(&private_display->lock);
- /* LCOV_EXCL_STOP */
return ret;
}
output_hwc_target_buffer_commit_handler = calloc(1, sizeof(tdm_private_output_hwc_target_buffer_commit_handler));
if (!output_hwc_target_buffer_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 */
}
output_hwc_target_buffer_commit_handler->private_output = private_output;
ret = tdm_layer_commit_internal(private_layer, _tdm_output_hwc_layer_commit_handler, output_hwc_target_buffer_commit_handler);
if (ret != TDM_ERROR_NONE) {
- /* LCOV_EXCL_START */
TDM_ERR("failed: commit layer(target buffer)");
free(output_hwc_target_buffer_commit_handler);
_pthread_mutex_unlock(&private_display->lock);
- /* LCOV_EXCL_STOP */
return ret;
}
func_output = &private_module->func_output;
if (!func_output->output_hwc_get_video_supported_formats) {
- /* LCOV_EXCL_START */
_pthread_mutex_unlock(&private_display->lock);
TDM_WRN("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
- /* LCOV_EXCL_STOP */
}
ret = func_output->output_hwc_get_video_supported_formats(
return TDM_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */