e_hwc_window: recreate hwc_window of video when zone is changed 02/271302/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 25 Jan 2022 09:56:07 +0000 (18:56 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:15:13 +0000 (11:15 +0900)
hwc_window should be recreated when hwc_window of output is changed
because tdm_hwc_window is created by tdm_hwc and tdm_hwc is changed
if output is changed

Change-Id: Idc59ab4f93cc3ef639e6ef13d7be2487f2c66be6

src/bin/e_hwc_window.c

index eaf5cfb..1263fb4 100644 (file)
@@ -876,6 +876,7 @@ _e_hwc_window_client_cb_zone_set(void *data, int type, void *event)
    E_Zone *zone;
    E_Output *output;
    E_Hwc_Window *hwc_window = NULL;
+   Eina_Bool is_video = EINA_FALSE;
 
    ev = event;
    EINA_SAFETY_ON_NULL_GOTO(ev, end);
@@ -900,16 +901,17 @@ _e_hwc_window_client_cb_zone_set(void *data, int type, void *event)
 
    if (ec->hwc_window)
      {
-        /* we manage the video window in the video module */
-        if (e_hwc_window_is_video(ec->hwc_window)) goto end;
         if (ec->hwc_window->hwc == output->hwc) goto end;
 
+        is_video = e_hwc_window_is_video(ec->hwc_window);
         _e_hwc_window_del(ec->hwc_window);
      }
 
    hwc_window = _e_hwc_window_new(output->hwc, ec, E_HWC_WINDOW_STATE_NONE);
    EINA_SAFETY_ON_NULL_GOTO(hwc_window, end);
 
+   if (is_video) e_hwc_window_video_set(hwc_window, is_video);
+
    EHWINF("set on eout:%p, zone_id:%d.",
           ec, hwc_window->hwc, hwc_window, output, zone->id);