e_output: do not create the e_hwc when there is already existed one 24/210324/2
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 18 Jul 2019 03:30:41 +0000 (12:30 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 18 Jul 2019 06:36:03 +0000 (06:36 +0000)
Change-Id: I695f57cd8aaddf7f4fac6f70b4c76259175a567e

src/bin/e_output.c

index 8bd2e48167d3e88d5af6e67d4dd3e06464de429d..d0f2ac4bb44e5e1ce901f65d1524794ac5aa1ff2 100644 (file)
@@ -2727,24 +2727,24 @@ e_output_hwc_setup(E_Output *output)
    E_Hwc *hwc = NULL;
    Eina_List *l, *ll;
    E_Plane *plane = NULL;
+   E_Output *primary_output = NULL;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
 
    /* available only the primary output now. */
-
-   if (e_comp->hwc)
+   if (output->hwc)
      {
-        hwc = e_hwc_new(output);
-        EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
-        output->hwc = hwc;
+        EOINF("Already has the HWC.", output);
+        return EINA_TRUE;
      }
 
+   hwc = e_hwc_new(output);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
+   output->hwc = hwc;
+
    if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
      {
-        E_Output *primary_output = NULL;
-
         primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
-
         if (primary_output == output)
           {
              /* ecore evas engine setup */