e_hwc_windows: set the DEVICE type by force when the ec is not redirected. 73/201473/3 accepted/tizen/unified/20190319.051301 submit/tizen/20190318.061002
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 14 Mar 2019 09:45:38 +0000 (18:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 15 Mar 2019 06:23:25 +0000 (06:23 +0000)
That the ec is not redirected means that E20 does not care about the ec.
Therefore, E20 has no right to set the CLIENT type. It just let it go
to set the DEVICE type and make the tdm backend decides the hwc policy.

Change-Id: I5298d2a044f3c7ac08da2052321adfd04f8a2dee

src/bin/e_hwc_windows.c

index 9f0774c8b7aeedfd83f3da34d14dc00cf65f896a..82c40781724d29517d7f9c510de110ac8364d625 100644 (file)
@@ -1686,6 +1686,7 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
    Eina_List *visible_windows = NULL;
    Eina_List *l;
    E_Hwc_Window *hwc_window = NULL;
+   E_Client *ec = NULL;
 
    /* get the visible ecs */
    visible_windows = hwc->visible_windows;
@@ -1712,7 +1713,18 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
              if (e_hwc_window_device_state_available_get(hwc_window))
                e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
              else
-               e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+               {
+                  ec = hwc_window->ec;
+                  if (!ec) continue;
+                  if (ec->redirected)
+                    e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+                  else
+                    {
+                       e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
+                       EHWSTRACE("   ehw:%p -- {%25s} is Force hwc_acceptable(Redirected FALSE).",
+                               hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+                    }
+               }
           }
      }
    else
@@ -1727,10 +1739,20 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
                   continue;
                }
 
-             e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
-
-             EHWSTRACE("   ehw:%p -- {%25s} is NOT hwc_acceptable.",
-                     hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+             ec = hwc_window->ec;
+             if (!ec) continue;
+             if (ec->redirected)
+               {
+                  e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+                  EHWSTRACE("   ehw:%p -- {%25s} is NOT hwc_acceptable.",
+                          hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+               }
+             else
+               {
+                  e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
+                  EHWSTRACE("   ehw:%p -- {%25s} is Force hwc_acceptable(Redirected FALSE).",
+                          hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+               }
           }
      }
 }