}
}
-EXTERN tdm_error
-tdm_layer_set_buffer(tdm_layer *layer, tbm_surface_h buffer)
+INTERN tdm_error
+tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h buffer)
{
+ tdm_private_output *private_output = private_layer->private_output;
+ tdm_private_display *private_display = private_output->private_display;
tdm_func_layer *func_layer;
- LAYER_FUNC_ENTRY();
-
- TDM_RETURN_VAL_IF_FAIL(buffer != NULL, TDM_ERROR_INVALID_PARAMETER);
-
- _pthread_mutex_lock(&private_display->lock);
-
/* LCOV_EXCL_START */
/* dump buffer */
if (tdm_dump_enable && !(private_layer->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO))
if (!func_layer->layer_set_buffer) {
/* LCOV_EXCL_START */
- _pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
/* LCOV_EXCL_START */
TDM_TRACE_ASYNC_BEGIN((intptr_t)private_layer, "[LAYER] %d", tbm_bo_export(bo));
}
+ return TDM_ERROR_NONE;
+}
+
+EXTERN tdm_error
+tdm_layer_set_buffer(tdm_layer *layer, tbm_surface_h buffer)
+{
+ LAYER_FUNC_ENTRY();
+
+ TDM_RETURN_VAL_IF_FAIL(buffer != NULL, TDM_ERROR_INVALID_PARAMETER);
+
+ _pthread_mutex_lock(&private_display->lock);
+
+ ret = tdm_layer_set_buffer_internal(private_layer, buffer);
+
_pthread_mutex_unlock(&private_display->lock);
return ret;
tdm_layer_committed(tdm_private_layer *private_layer, tdm_private_layer_buffer **committed_buffer);
tdm_error
tdm_layer_set_info_internal(tdm_private_layer *private_layer, tdm_info_layer *info);
+tdm_error
+tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h buffer);
void
tdm_pp_cb_done(tdm_pp *pp_backend, tbm_surface_h src, tbm_surface_h dst,