e_hwc_window: add is_root_target flag to window 08/271308/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 8 Feb 2022 10:45:57 +0000 (19:45 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:15:24 +0000 (11:15 +0900)
Change-Id: I7771731770b2a12e4e6075d49a9a4fc8c53b62b4

src/bin/e_hwc.c
src/bin/e_hwc_window.c
src/bin/e_hwc_window.h
src/bin/e_hwc_windows.c
src/bin/e_hwc_windows.h

index 743c138..5c340b9 100644 (file)
@@ -567,7 +567,7 @@ e_hwc_new(E_Output *output, Eina_Bool primary_output)
    if (e_hwc_policy_get(hwc) == E_HWC_POLICY_WINDOWS)
      {
         /* create the target_window to the hwc */
-        hwc->target_hwc_window = e_hwc_windows_target_window_new(hwc);
+        hwc->target_hwc_window = e_hwc_windows_target_window_new(hwc, EINA_FALSE);
         if (!hwc->target_hwc_window)
           {
              EHERR("e_hwc_windows_target_window_new failed", hwc);
@@ -576,7 +576,7 @@ e_hwc_new(E_Output *output, Eina_Bool primary_output)
 
         if (primary_output)
           {
-             hwc->root_target_hwc_window = e_hwc_windows_target_window_new(hwc);
+             hwc->root_target_hwc_window = e_hwc_windows_target_window_new(hwc, EINA_TRUE);
              if (!hwc->root_target_hwc_window)
                {
                   EHERR("e_hwc_windows_target_window_new failed", hwc);
index 1263fb4..9537f6f 100644 (file)
@@ -2588,6 +2588,9 @@ e_hwc_window_name_get(E_Hwc_Window *hwc_window)
    if (!hwc_window)
      return "UNKNOWN";
 
+   if (hwc_window->is_root_target)
+     return "@ROOT TARGET WINDOW@";
+
    if (hwc_window->is_target)
      return "@TARGET WINDOW@";
 
index 711d0f7..90be3a4 100644 (file)
@@ -94,6 +94,7 @@ struct _E_Hwc_Window
    tdm_hwc_window                *thwc_window;
    int                            zpos;
    Eina_Bool                      is_target;
+   Eina_Bool                      is_root_target;
    Eina_Bool                      is_video;
    Eina_Bool                      is_cursor;
    Eina_Bool                      is_external;
index 0a0ff2f..a7f9e9c 100644 (file)
@@ -462,8 +462,7 @@ _e_hwc_windows_commit_data_acquire(E_Hwc *hwc)
    /* return TRUE when the number of the commit data is more than one */
    EINA_LIST_FOREACH(hwc->hwc_windows, l, hwc_window)
      {
-        if ((E_Hwc_Window *)hwc->root_target_hwc_window == hwc_window)
-          continue;
+        if (hwc_window->is_root_target) continue;
 
         commit_data = e_hwc_window_commit_data_acquire(hwc_window);
         if (!commit_data)
@@ -3705,7 +3704,7 @@ e_hwc_windows_ecore_evas_set(E_Hwc *hwc, Ecore_Evas *ee)
 }
 
 EINTERN E_Hwc_Window_Target *
-e_hwc_windows_target_window_new(E_Hwc *hwc)
+e_hwc_windows_target_window_new(E_Hwc *hwc, Eina_Bool is_root_target)
 {
    E_Hwc_Window_Target *target_hwc_window;
 
@@ -3718,6 +3717,7 @@ e_hwc_windows_target_window_new(E_Hwc *hwc)
    target_hwc_window = E_OBJECT_ALLOC(E_Hwc_Window_Target, E_HWC_WINDOW_TYPE, _e_hwc_windows_target_window_free);
    EINA_SAFETY_ON_NULL_GOTO(target_hwc_window, fail);
 
+   ((E_Hwc_Window *)target_hwc_window)->is_root_target = is_root_target;
    ((E_Hwc_Window *)target_hwc_window)->is_target = EINA_TRUE;
    ((E_Hwc_Window *)target_hwc_window)->state = E_HWC_WINDOW_STATE_DEVICE;
    ((E_Hwc_Window *)target_hwc_window)->accepted_state = E_HWC_WINDOW_STATE_DEVICE;
index 3cac779..e46bc73 100644 (file)
@@ -36,7 +36,7 @@ EINTERN void                 e_hwc_windows_deinit(void);
 EINTERN Eina_Bool            e_hwc_windows_render(E_Hwc *hwc);
 EINTERN Eina_Bool            e_hwc_windows_commit(E_Hwc *hwc, E_Output_Display_Mode display_mode);
 EINTERN Eina_Bool            e_hwc_windows_ecore_evas_set(E_Hwc *hwc, Ecore_Evas *ee);
-EINTERN E_Hwc_Window_Target *e_hwc_windows_target_window_new(E_Hwc *hwc);
+EINTERN E_Hwc_Window_Target *e_hwc_windows_target_window_new(E_Hwc *hwc, Eina_Bool is_root_target);
 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);