e_hwc_windows: get acquire fence from root target hwc window 27/271327/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 11 Feb 2022 07:12:19 +0000 (16:12 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:16:07 +0000 (11:16 +0900)
root target hwc window has acquire fence
because root target hwc window has ecore evas.

Change-Id: Id09222e585a54ad0fa3140aefeda699f580485ac

src/bin/e_hwc_windows.c

index 4f4043e1d6ffcebaa5644b61a9923530e95b1436..c38be390a840652f54d414a2ecfdf32296f5dc49 100644 (file)
@@ -783,7 +783,7 @@ _e_hwc_windows_root_target_buffer_fetch(E_Hwc *hwc)
 static Eina_Bool
 _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc)
 {
-   E_Hwc_Window_Target *target_hwc_window;
+   E_Hwc_Window_Target *target_hwc_window, *root_target_hwc_window;
    E_Hwc_Window *hwc_window, *root_hwc_window;
    E_Hwc_Window_Queue_Buffer *queue_buffer;
    E_Output *primary_output;
@@ -801,8 +801,8 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc)
 
    if (hwc->primary_output)
      {
-        root_hwc_window = (E_Hwc_Window *)hwc->root_target_hwc_window;
-        EINA_SAFETY_ON_NULL_RETURN_VAL(root_hwc_window, EINA_FALSE);
+        root_target_hwc_window = hwc->root_target_hwc_window;
+        EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
      }
    else
      {
@@ -810,10 +810,12 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc)
         EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
         EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output->hwc, EINA_FALSE);
 
-        root_hwc_window = (E_Hwc_Window *)primary_output->hwc->root_target_hwc_window;
-        EINA_SAFETY_ON_NULL_RETURN_VAL(root_hwc_window, EINA_FALSE);
+        root_target_hwc_window = primary_output->hwc->root_target_hwc_window;
+        EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
      }
 
+   root_hwc_window = (E_Hwc_Window *)root_target_hwc_window;
+
    if (hwc_window->state == E_HWC_WINDOW_STATE_DEVICE)
      {
         if (target_hwc_window->pp_queue)
@@ -836,9 +838,9 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc)
         CLEAR(fb_damage);
 
         tdm_hwc_set_client_target_buffer(thwc, hwc_window->current.buffer.tsurface, fb_damage);
-        if ((target_hwc_window->end_render_sync) && (e_hwc_windows_fence_enabled_get(hwc)))
+        if ((root_target_hwc_window->end_render_sync) && (e_hwc_windows_fence_enabled_get(hwc)))
           {
-             int fence = e_egl_sync_fence_fd_dup(target_hwc_window->end_render_sync);
+             int fence = e_egl_sync_fence_fd_dup(root_target_hwc_window->end_render_sync);
              if (fence >= 0)
                {
                   tdm_hwc_set_client_target_acquire_fence(thwc, fence);