Revert "hwc: add the prototypes to avoid build break"
[platform/core/uifw/libtdm.git] / src / tdm_hwc.c
index f7ed46f..fc9563c 100644 (file)
@@ -178,7 +178,7 @@ tdm_hwc_create_window(tdm_hwc *hwc, tdm_error *error)
 }
 
 EXTERN tdm_error
-tdm_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count)
+tdm_hwc_get_video_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count)
 {
        tdm_private_module *private_module;
        tdm_func_hwc *func_hwc;
@@ -193,7 +193,7 @@ tdm_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *cou
        private_module = private_output->private_module;
        func_hwc = &private_module->func_hwc;
 
-       if (!func_hwc->hwc_get_supported_formats) {
+       if (!func_hwc->hwc_get_video_supported_formats) {
                /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_WRN("not implemented!!");
@@ -201,7 +201,66 @@ tdm_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *cou
                /* LCOV_EXCL_STOP */
        }
 
-       ret = func_hwc->hwc_get_supported_formats(private_hwc->hwc_backend, formats, count);
+       ret = func_hwc->hwc_get_video_supported_formats(private_hwc->hwc_backend, formats, count);
+
+       _pthread_mutex_unlock(&private_display->lock);
+
+       return ret;
+}
+
+EXTERN tdm_error
+tdm_hwc_get_video_available_properties(tdm_hwc *hwc, const tdm_prop **props, int *count)
+{
+       tdm_private_module *private_module;
+       tdm_func_hwc *func_hwc = NULL;
+
+       HWC_FUNC_ENTRY();
+
+       TDM_RETURN_VAL_IF_FAIL(props != NULL, TDM_ERROR_INVALID_PARAMETER);
+       TDM_RETURN_VAL_IF_FAIL(count != NULL, TDM_ERROR_INVALID_PARAMETER);
+
+       _pthread_mutex_lock(&private_display->lock);
+
+       private_module = private_output->private_module;
+       func_hwc = &private_module->func_hwc;
+
+       if (!func_hwc->hwc_get_video_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->hwc_get_video_available_properties(private_hwc->hwc_backend, props, count);
+
+       _pthread_mutex_unlock(&private_display->lock);
+
+       return ret;
+}
+
+EXTERN tdm_error
+tdm_hwc_get_video_capability(tdm_hwc *hwc,
+                                                       tdm_hwc_video_capability *video_capability)
+{
+       tdm_private_module *private_module;
+       tdm_func_hwc *func_hwc;
+
+       HWC_FUNC_ENTRY();
+
+       _pthread_mutex_lock(&private_display->lock);
+
+       private_module = private_output->private_module;
+       func_hwc = &private_module->func_hwc;
+
+       if (!func_hwc->hwc_get_video_capability) {
+               _pthread_mutex_unlock(&private_display->lock);
+               TDM_WRN("not implemented!!");
+               return TDM_ERROR_NOT_IMPLEMENTED;
+       }
+
+       ret = func_hwc->hwc_get_video_capability(private_hwc->hwc_backend,
+                                                                                       video_capability);
 
        _pthread_mutex_unlock(&private_display->lock);
 
@@ -424,7 +483,7 @@ tdm_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements,
 }
 
 EXTERN tdm_error
-tdm_hwc_accept_changes(tdm_hwc *hwc)
+tdm_hwc_accept_validation(tdm_hwc *hwc)
 {
        tdm_private_module *private_module;
        tdm_func_hwc *func_hwc = NULL;
@@ -444,7 +503,7 @@ tdm_hwc_accept_changes(tdm_hwc *hwc)
                /* LCOV_EXCL_STOP */
        }
 
-       ret = func_hwc->hwc_accept_changes(private_hwc->hwc_backend);
+       ret = func_hwc->hwc_accept_validation(private_hwc->hwc_backend);
 
        _pthread_mutex_unlock(&private_display->lock);