e_comp_screen: move the functions 63/314263/2
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 5 Jul 2024 07:42:29 +0000 (16:42 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 10 Jul 2024 02:55:30 +0000 (02:55 +0000)
call the e_comp_screen_init() and e_comp_screen_shutdown()
at the e_main.c and remove them from e_comp.c.
e_comp includes the rendering compositing stuff, so e_comp_screen
is not included in e_comp.

Change-Id: Ic5ed41b4cd9576ab0dac489700155960e141387b

src/bin/compmgr/e_comp.c
src/bin/e_comp_screen.c
src/bin/e_main.c

index 65360dce147fffecb9faabcce411d56e467fc7fb..359b53613ea12b714d04a18f3a177febafd4930d 100644 (file)
@@ -2,7 +2,10 @@
 #include "e_utils_intern.h"
 #include "e_comp_canvas_intern.h"
 #include "e_comp_cfdata_intern.h"
+#ifdef E_DISPLAY
+#else
 #include "e_comp_screen_intern.h"
+#endif
 #include "e_comp_wl_intern.h"
 #include "e_client_intern.h"
 #include "e_hwc_intern.h"
@@ -326,17 +329,6 @@ e_comp_init(void)
    if (conf->avoid_afill) e_comp->avoid_afill = EINA_TRUE;
    if (conf->hwc_prefer_gbm) e_comp->hwc_prefer_gbm = EINA_TRUE;
 
-   e_main_ts_begin("\tE_Comp_Screen Init");
-   if (!e_comp_screen_init())
-     {
-        e_main_ts_end("\tE_Comp_Screen Init Failed");
-        ERR("Fail to init e_comp_screen");
-        e_object_del(E_OBJECT(e_comp));
-        E_FREE_FUNC(ignores, eina_hash_free);
-        return EINA_FALSE;
-     }
-   e_main_ts_end("\tE_Comp_Screen Init Done");
-
    if (e_comp->hwc)
      {
         if (conf->hwc_deactive) e_comp_hwc_deactive_set(EINA_TRUE);
@@ -402,9 +394,6 @@ e_comp_shutdown(void)
         e_object_del(E_OBJECT(ec));
      }
 
-   e_server_shutdown();
-   e_comp_screen_shutdown();
-
    e_object_del(E_OBJECT(e_comp));
    e_comp_object_shutdown();
    E_FREE_LIST(handlers, ecore_event_handler_del);
index 1b26998a2432a379c00c0d84f16043ef7e730844..fdade920614d322abd3339a700d56846764b075c 100644 (file)
@@ -1189,6 +1189,9 @@ e_comp_screen_shutdown()
 
    E_FREE_LIST(event_handlers, ecore_event_handler_del);
 
+   e_server_shutdown();
+   e_input_shutdown();
+
    /* delete e_comp_sreen */
    _e_comp_screen_del(e_comp->e_comp_screen);
    e_comp->e_comp_screen = NULL;
index 3f83645280f871901ab008116a9c5bc6182ef5e1..c8211550063a05305772861c3636ec29647f2add 100644 (file)
@@ -34,6 +34,7 @@
 #include "e_eom_intern.h"
 #include "e_input_intern.h"
 #include "e_input_backend_intern.h"
+#include "e_comp_screen_intern.h"
 
 #include <Eio.h>
 
@@ -1120,12 +1121,17 @@ _e_main_screens_init(void)
 
    TSB("Compositor Init");
    PRCTL("[Winsys] start of compositor init");
-   if (!e_comp_init())
+   e_comp_init();
+   TSE("Compositor Init Done");
+
+   TSB("E_Comp_Screen Init");
+   if (!e_comp_screen_init())
      {
-        e_error_message_show(_("Enlightenment cannot create a compositor.\n"));
-        _e_main_shutdown(-1);
+        TSE("E_Comp_Screen Init Failed");
+        ERR("e_comp_screen_init() failed.");
+        return 0;
      }
-   TSE("Compositor Init Done");
+   TSE("E_Comp_Screen Init Done");
 
    PRCTL("[Winsys] end of compositor init");
    _e_main_desk_restore();
@@ -1136,12 +1142,14 @@ _e_main_screens_init(void)
 static int
 _e_main_screens_shutdown(void)
 {
+   e_comp_screen_shutdown();
    e_comp_shutdown();
    e_client_shutdown();
 
    e_magnifier_shutdown();
    e_desk_shutdown();
    e_zone_shutdown();
+
    return 1;
 }