From 7e2f0d5488666d7348545d1cacee1e1b74d6fa76 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 30 Jul 2020 13:43:46 +0900 Subject: [PATCH] e_hwc_windows: attach null buffer after e_comp_object_redirected_set e_comp_object_redireceted_set should be called after buffer is attached to surface, because evas_map of screen rotation is applied when e_comp_object_redirected_set. Change-Id: I8073079f0f98c660a02c98361888b973466608cf --- src/bin/e_hwc_window.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/bin/e_hwc_window.c b/src/bin/e_hwc_window.c index 7f1e9e3bb2..abdbf6abf0 100644 --- a/src/bin/e_hwc_window.c +++ b/src/bin/e_hwc_window.c @@ -2033,7 +2033,7 @@ e_hwc_window_constraints_update(E_Hwc_Window *hwc_window) } static Eina_Bool -_e_hwc_window_client_recover(E_Hwc_Window *hwc_window) +_e_hwc_window_client_recover(E_Hwc_Window *hwc_window, Eina_Bool *clear_attach) { E_Comp_Wl_Buffer *recover_buffer = NULL;; E_Comp_Wl_Buffer *comp_wl_buffer; @@ -2090,8 +2090,13 @@ _e_hwc_window_client_recover(E_Hwc_Window *hwc_window) e_comp_object_render(ec->frame); } - if (!comp_wl_buffer && ec->comp_data) - e_comp_wl_surface_attach(ec, NULL); + if (clear_attach) + { + if (!comp_wl_buffer) + *clear_attach = EINA_TRUE; + else + *clear_attach = EINA_FALSE; + } return EINA_TRUE; } @@ -2101,6 +2106,7 @@ _e_hwc_window_rendered_window_set(E_Hwc_Window *hwc_window, Eina_Bool set) { E_Client *ec = NULL; Eina_Bool ret; + Eina_Bool clear_attach = EINA_FALSE; EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE); @@ -2113,7 +2119,7 @@ _e_hwc_window_rendered_window_set(E_Hwc_Window *hwc_window, Eina_Bool set) if (set) { - ret = _e_hwc_window_client_recover(hwc_window); + ret = _e_hwc_window_client_recover(hwc_window, &clear_attach); if (hwc_window->ec->redirected) { @@ -2125,6 +2131,9 @@ _e_hwc_window_rendered_window_set(E_Hwc_Window *hwc_window, Eina_Bool set) EHWTRACE("Redirect -- {%s}", hwc_window->ec, hwc_window->hwc, hwc_window, e_hwc_window_name_get(hwc_window)); } + + if (clear_attach && ec->comp_data) + e_comp_wl_surface_attach(ec, NULL); } else { -- 2.34.1