e_hwc: set fake config to output before initialize ecore_evas 14/271314/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 27 Jan 2022 11:27:53 +0000 (20:27 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:15:36 +0000 (11:15 +0900)
Change-Id: Ied469c2c8aa8402655e673face4c2482c8992612

src/bin/e_comp_screen.c
src/bin/e_hwc.c

index e1c4c94e226023fdc9a2987c01ae302868b458b7..719870d70a1b45b3556a2acf1373f0d58430c356 100644 (file)
@@ -673,18 +673,26 @@ _e_comp_screen_deinit_outputs(E_Comp_Screen *e_comp_screen)
 static Eina_Bool
 _e_comp_screen_fake_output_set(E_Comp_Screen *e_comp_screen)
 {
-   E_Output *output = NULL;
+   E_Output *primary_output = NULL;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
 
-   output = e_output_find_by_index(0);
+   primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
 
-   if (!e_output_hwc_setup(output))
+   if (!e_output_hwc_setup(primary_output))
      {
         ERR("fail to e_output_hwc_setup.");
         return EINA_FALSE;
      }
 
+   if (!e_output_fake_config_set(primary_output, 2, 1))
+     {
+        e_error_message_show(_("Fail to set the fake output config!\n"));
+        e_hwc_ecore_evas_deinit();
+        return EINA_FALSE;
+     }
+
    return EINA_TRUE;
 }
 
@@ -820,7 +828,6 @@ _e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
      }
 
    //TODO: if there is no output connected, make the fake output which is connected.
-
    if (!connection_check)
      {
         if (!_e_comp_screen_fake_output_set(e_comp_screen))
index 5c340b9329162ad4e800c42004aaadad677056f8..73fd21d54e0c3378c9bca22b442712713a6f992f 100644 (file)
@@ -369,20 +369,6 @@ e_hwc_ecore_evas_init(void)
    /* get the size of the primary output */
    e_output_size_get(primary_output, &scr_w, &scr_h);
 
-   /* if output is disconnected, set the default width, height */
-   if (scr_w == 0 || scr_h == 0)
-     {
-        scr_w = 2;
-        scr_h = 1;
-
-        if (!e_output_fake_config_set(primary_output, scr_w, scr_h))
-          {
-             e_hwc_ecore_evas_deinit();
-             e_error_message_show(_("Fail to set the fake output config!\n"));
-             return EINA_FALSE;
-          }
-     }
-
    EHINF("GL available:%d config engine:%d screen size:%dx%d", hwc,
        e_comp_gl_get(), e_comp_config_get()->engine, scr_w, scr_h);