From: Seunghun Lee Date: Mon, 17 Dec 2018 02:17:02 +0000 (+0900) Subject: video: Use an static function to get hwc policy of zone. X-Git-Tag: accepted/tizen/unified/20181226.063554~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f5d75f353879c43a95570f2aca682f40588943c;p=platform%2Fupstream%2Fenlightenment.git video: Use an static function to get hwc policy of zone. Change-Id: I016fd4e04d442602108d9b459f986fd15c1a196a --- diff --git a/src/bin/video/e_client_video.c b/src/bin/video/e_client_video.c index 9c9301f..e6c483b 100644 --- a/src/bin/video/e_client_video.c +++ b/src/bin/video/e_client_video.c @@ -26,6 +26,21 @@ struct _E_Client_Video Ecore_Event_Handler *eeh_zone_set; }; +static E_Hwc_Policy +_e_client_video_zone_hwc_policy_get(E_Zone *zone) +{ + E_Output *eout; + + eout = e_output_find(zone->output_id); + if (!eout) + { + ERR("Something wrong, couldn't find 'E_Output' from 'E_Zone'"); + return E_HWC_POLICY_NONE; + } + + return e_hwc_policy_get(eout->hwc); +} + static void _e_client_video_comp_iface_deinit(E_Client_Video *ecv) { @@ -37,7 +52,6 @@ static Eina_Bool _e_client_video_comp_iface_init(E_Client_Video *ecv, E_Client *ec) { E_Video_Comp_Iface *iface = NULL; - E_Output *eout; E_Hwc_Policy hwc_pol; if ((e_config->eom_enable == EINA_TRUE) && (e_eom_is_ec_external(ec))) @@ -55,14 +69,7 @@ _e_client_video_comp_iface_init(E_Client_Video *ecv, E_Client *ec) goto end; } - eout = e_output_find(ec->zone->output_id); - if (!eout) - { - ERR("Something wrong, couldn't find 'E_Output' from 'E_Zone'"); - goto end; - } - - hwc_pol = e_hwc_policy_get(eout->hwc); + hwc_pol = _e_client_video_zone_hwc_policy_get(ec->zone); if (hwc_pol == E_HWC_POLICY_WINDOWS) { INF("Initialize the interface of the client_video for HWC WINDOWS mode");