From: SooChan Lim Date: Thu, 13 Dec 2018 23:42:07 +0000 (+0900) Subject: hwc: add the hwc capabilities X-Git-Tag: accepted/tizen/5.0/unified/20181217.064535~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Flibtdm.git;a=commitdiff_plain;h=1e5cde6cf72bf4242af6e9d1c2a6d57b5e2311ad hwc: add the hwc capabilities replace hwc video capabilities into hwc capabilities Change-Id: I1b9640b5c3bd06dff5899f9628de40f3ac0fa911 --- diff --git a/include/tdm.h b/include/tdm.h index c18b27e..125ca56 100644 --- a/include/tdm.h +++ b/include/tdm.h @@ -917,13 +917,13 @@ tdm_error tdm_hwc_get_video_available_properties(tdm_hwc *hwc, const tdm_prop **props, int *count); /** - * @brief Get the hwc video capability + * @brief Get the hwc capabilites * @param[in] hwc A hwc object - * @param[out] video_capability A hwc video capability + * @param[out] capabilities A hwc capability * @return #TDM_ERROR_NONE if success. Otherwise, error value. */ tdm_error -tdm_hwc_get_video_capability(tdm_hwc *hwc, tdm_hwc_video_capability *video_capability); +tdm_hwc_get_capabilities(tdm_hwc *hwc, tdm_hwc_capability *capabilities); /** * @brief Get the available property array of a hwc object. diff --git a/include/tdm_backend.h b/include/tdm_backend.h index b131ced..c515934 100644 --- a/include/tdm_backend.h +++ b/include/tdm_backend.h @@ -813,13 +813,12 @@ typedef struct _tdm_func_hwc { int *count); /** - * @brief Get the hwc video capability + * @brief Get the hwc capabilities * @param[in] hwc A hwc object - * @param[out] video_capability A hwc hwc video capability + * @param[out] capabilities A hwc hwc capability * @return #TDM_ERROR_NONE if success. Otherwise, error value. */ - tdm_error (*hwc_get_video_capability)(tdm_hwc *hwc, - tdm_hwc_video_capability *video_capability); + tdm_error (*hwc_get_capabilities)(tdm_hwc *hwc, tdm_hwc_capability *capabilities); /** * @brief Get the available property array of a hwc object. diff --git a/include/tdm_common.h b/include/tdm_common.h index b402277..70a081c 100644 --- a/include/tdm_common.h +++ b/include/tdm_common.h @@ -261,13 +261,14 @@ typedef enum { /* * @brief The hwc video capability enumeration - * @since 2.0.0 + * @since 2.7.0 */ typedef enum { - TDM_HWC_VIDEO_CAPABILITY_SCALE = (1 << 1), /**< if a hwc video has scale capability */ - TDM_HWC_VIDEO_CAPABILITY_TRANSFORM = (1 << 2), /**< if a hwc video has transform capability */ - TDM_HWC_VIDEO_CAPABILITY_SCANOUT = (1 << 3), /**< if a video allows a scanout buffer only */ -} tdm_hwc_video_capability; + TDM_HWC_CAPABILITY_VIDEO_STREAM = (1 << 1), /**< if a hwc has video stream capability */ + TDM_HWC_CAPABILITY_VIDEO_SCALE = (1 << 2), /**< if a hwc allows to scale the video buffer */ + TDM_HWC_CAPABILITY_VIDEO_TRANSFORM = (1 << 3), /**< if a hwc allows video to transform the video buffer */ + TDM_HWC_CAPABILITY_VIDEO_SCANOUT = (1 << 4), /**< if a hwc allows video to accept the scanout buffer only */ +} tdm_hwc_capability; /** * @brief The size structure diff --git a/src/tdm_hwc.c b/src/tdm_hwc.c index fc9563c..2632c5b 100644 --- a/src/tdm_hwc.c +++ b/src/tdm_hwc.c @@ -240,8 +240,7 @@ tdm_hwc_get_video_available_properties(tdm_hwc *hwc, const tdm_prop **props, int } EXTERN tdm_error -tdm_hwc_get_video_capability(tdm_hwc *hwc, - tdm_hwc_video_capability *video_capability) +tdm_hwc_get_capabilities(tdm_hwc *hwc, tdm_hwc_capability *capabilities) { tdm_private_module *private_module; tdm_func_hwc *func_hwc; @@ -253,14 +252,13 @@ tdm_hwc_get_video_capability(tdm_hwc *hwc, private_module = private_output->private_module; func_hwc = &private_module->func_hwc; - if (!func_hwc->hwc_get_video_capability) { + if (!func_hwc->hwc_get_capabilities) { _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); + ret = func_hwc->hwc_get_capabilities(private_hwc->hwc_backend, capabilities); _pthread_mutex_unlock(&private_display->lock);