From: SooChan Lim Date: Thu, 18 Jul 2019 02:06:51 +0000 (+0900) Subject: e_hwc_windows: add the new/del target window function. X-Git-Tag: submit/tizen/20190718.064631~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a8d182d07b1320dde70a2478ef65de4b34b76e5;p=platform%2Fupstream%2Fenlightenment.git e_hwc_windows: add the new/del target window function. Change-Id: I6d99fc1568ed1a5a5d4b78ab7b2f46d85e122efb --- diff --git a/src/bin/e_hwc_windows.c b/src/bin/e_hwc_windows.c index b7a338a11c..5dc452e6e8 100644 --- a/src/bin/e_hwc_windows.c +++ b/src/bin/e_hwc_windows.c @@ -2347,6 +2347,40 @@ fail: return EINA_FALSE; } +EINTERN E_Hwc_Window_Target * +e_hwc_windows_target_window_new(E_Hwc *hwc) +{ + E_Hwc_Window_Target *target_hwc_window; + + EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, NULL); + EINA_SAFETY_ON_NULL_RETURN_VAL(hwc->thwc, NULL); + + if (e_hwc_policy_get(hwc) == E_HWC_POLICY_PLANES) + return NULL; + + target_hwc_window = _e_hwc_windows_target_window_new(hwc); + EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, NULL); + target_hwc_window->hwc = hwc; + + hwc->hwc_windows = eina_list_append(hwc->hwc_windows, target_hwc_window); + + return target_hwc_window; +} + +EINTERN void +e_hwc_windows_target_window_del(E_Hwc_Window_Target *target_hwc_window) +{ + E_Hwc *hwc; + + EINA_SAFETY_ON_NULL_RETURN(target_hwc_window); + + hwc = target_hwc_window->hwc; + EINA_SAFETY_ON_NULL_RETURN(hwc); + + hwc->hwc_windows = eina_list_remove(hwc->hwc_windows, hwc->target_hwc_window); + e_object_del(E_OBJECT(hwc->target_hwc_window)); +} + EINTERN Eina_Bool e_hwc_windows_pp_commit_possible_check(E_Hwc *hwc) { diff --git a/src/bin/e_hwc_windows.h b/src/bin/e_hwc_windows.h index ea89d9e22e..a692816e9e 100644 --- a/src/bin/e_hwc_windows.h +++ b/src/bin/e_hwc_windows.h @@ -20,6 +20,8 @@ EINTERN Eina_Bool e_hwc_windows_init(E_Hwc *hwc); EINTERN void e_hwc_windows_deinit(E_Hwc *hwc); EINTERN Eina_Bool e_hwc_windows_render(E_Hwc *hwc); EINTERN Eina_Bool e_hwc_windows_commit(E_Hwc *hwc); +EINTERN E_Hwc_Window_Target *e_hwc_windows_target_window_new(E_Hwc *hwc); +EINTERN void e_hwc_windows_target_window_del(E_Hwc_Window_Target *target_hwc_window); EINTERN void e_hwc_windows_rendered_window_add(E_Hwc_Window *hwc_window); EINTERN Eina_Bool e_hwc_windows_get_available_properties(E_Hwc *hwc, const tdm_prop **props, int *count); EINTERN Eina_Bool e_hwc_windows_get_video_available_properties(E_Hwc *hwc, const tdm_prop **props, int *count);