From c0ba32a678268c20095953b83be2fba98fab931d Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Mon, 8 Apr 2019 11:26:31 +0900 Subject: [PATCH] e_hwc_windows: do not pp commit if there is a pending data cannot make two pending data.(prevent memory leak) so if there is a pending data, cannot commit. Change-Id: I229f770d791a93a5d9e86ca9d2da622ee6bcc6e5 Signed-off-by: Junkyeong Kim --- src/bin/e_hwc_windows.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/bin/e_hwc_windows.c b/src/bin/e_hwc_windows.c index b0bf5de..3a0f640 100644 --- a/src/bin/e_hwc_windows.c +++ b/src/bin/e_hwc_windows.c @@ -2137,6 +2137,28 @@ _e_hwc_windows_target_buffer_prepared(E_Hwc *hwc) return EINA_TRUE; } +static Eina_Bool +_e_hwc_windos_pp_pending_window_check(E_Hwc *hwc) +{ + E_Hwc_Window *hwc_window = NULL; + E_Hwc_Window *hwc_window_pp = NULL; + const Eina_List *l; + + if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0) + { + hwc_window_pp = _e_hwc_windows_pp_get_hwc_window_for_zoom(hwc); + EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window_pp, EINA_FALSE); + + EINA_LIST_FOREACH(hwc->pending_pp_hwc_window_list, l, hwc_window) + { + if (hwc_window == hwc_window_pp) + return EINA_TRUE; + } + } + + return EINA_FALSE; +} + EINTERN Eina_Bool e_hwc_windows_init(E_Hwc *hwc) { @@ -2265,6 +2287,12 @@ e_hwc_windows_commit(E_Hwc *hwc) return EINA_TRUE; } + if (hwc->pp_set) + { + if (_e_hwc_windos_pp_pending_window_check(hwc)) + return EINA_TRUE; + } + if (!_e_hwc_windows_commit_data_acquire(hwc)) return EINA_TRUE; -- 2.7.4