hwc: get tdm_hwc before ecore_evas init 22/185522/2 22/185522/3
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 31 Jul 2018 03:13:42 +0000 (12:13 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 1 Aug 2018 05:01:28 +0000 (05:01 +0000)
tdm_hwc is needed for getting tbm_surface_queue of target

Change-Id: If34affb73a63da01187b844ab296c32e67a7b76e

src/bin/e_hwc.c

index a6662b5e20cfcb011f6274604ec2a5ff130524b9..f743232750eb9da145658b8aba9a63fa3086c32e 100644 (file)
@@ -301,6 +301,22 @@ e_hwc_new(E_Output *output)
 
    hwc->output = output;
 
+   if (!output->tdm_hwc)
+     {
+        hwc->hwc_policy = E_HWC_POLICY_PLANES;
+     }
+   else
+     {
+        hwc->hwc_policy = E_HWC_POLICY_WINDOWS;
+
+        hwc->thwc = tdm_output_get_hwc(output->toutput, &error);
+        if (!hwc->thwc)
+          {
+             ERR("hwc_opt: tdm_output_get_hwc failed");
+             goto fail;
+          }
+     }
+
    if (!_e_hwc_ee_init(hwc))
      {
         ERR("hwc_opt: _e_hwc_ee_init failed");
@@ -316,9 +332,8 @@ e_hwc_new(E_Output *output)
     *   - The tdm-backend decides the hwc policy with the E_Hwc_Windows associated with the tdm_hwc_window.
     *   - E20 asks to verify the composition types of the E_Hwc_Window of the ec.
     */
-   if (!output->tdm_hwc)
+   if (hwc->hwc_policy == E_HWC_POLICY_PLANES)
      {
-        hwc->hwc_policy = E_HWC_POLICY_PLANES;
         if (!e_hwc_planes_init())
           {
              ERR("hwc_opt: e_hwc_windows_init failed");
@@ -329,15 +344,6 @@ e_hwc_new(E_Output *output)
      }
    else
      {
-        hwc->hwc_policy = E_HWC_POLICY_WINDOWS;
-
-        hwc->thwc = tdm_output_get_hwc(output->toutput, &error);
-        if (!hwc->thwc)
-          {
-             ERR("hwc_opt: tdm_output_get_hwc failed");
-             goto fail;
-          }
-
         if (!e_hwc_windows_init(hwc))
           {
              ERR("hwc_opt: e_hwc_windows_init failed");