discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=2654b7e3e79197bd31cd21c87406c19ae5d969bb

commit 2654b7e3e79197bd31cd21c87406c19ae5d969bb
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Jun 25 19:28:38 2015 -0400

    move X idle flusher to comp_x
---
 src/bin/e_comp_x.c |  9 +++++++++
 src/bin/e_main.c   | 20 +-------------------
 2 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index caa264e..97a9c1d 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -43,6 +43,7 @@ static Eina_Hash *frame_extents = NULL;
 static Eina_Hash *alarm_hash = NULL;
 
 static Ecore_Idle_Enterer *_e_comp_x_post_client_idler = NULL;
+static Ecore_Idle_Enterer *_x_idle_flush = NULL;
 static Eina_List *post_clients = NULL;
 
 static int _e_comp_x_mapping_change_disabled = 0;
@@ -56,6 +57,13 @@ static Eina_Bool screensaver_dimmed = EINA_FALSE;
 static Ecore_X_Atom backlight_atom = 0;
 extern double e_bl_val;
 
+static Eina_Bool
+_e_comp_x_flusher(void *data EINA_UNUSED)
+{
+   ecore_x_flush();
+   return ECORE_CALLBACK_RENEW;
+}
+
 static inline Ecore_X_Window
 _e_comp_x_client_window_get(const E_Client *ec)
 {
@@ -5127,6 +5135,7 @@ e_comp_x_init(void)
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_RANDR_CHANGE, 
_e_comp_x_randr_change, NULL);
 
    ecore_x_sync();
+   _x_idle_flush = ecore_idle_enterer_add(_e_comp_x_flusher, NULL);
 
    return EINA_TRUE;
 }
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 8812d02..4575499 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -84,7 +84,6 @@ static void      _e_main_desk_save(void);
 static void      _e_main_desk_restore(void);
 static void      _e_main_efreet_paths_init(void);
 static void      _e_main_modules_load(Eina_Bool safe_mode);
-static Eina_Bool _e_main_cb_x_flusher(void *data EINA_UNUSED);
 static Eina_Bool _e_main_cb_idle_before(void *data EINA_UNUSED);
 static Eina_Bool _e_main_cb_idle_after(void *data EINA_UNUSED);
 static Eina_Bool _e_main_cb_startup_fake_end(void *data EINA_UNUSED);
@@ -100,7 +99,6 @@ static int(*_e_main_shutdown_func[MAX_LEVEL]) (void);
 
 static Ecore_Idle_Enterer *_idle_before = NULL;
 static Ecore_Idle_Enterer *_idle_after = NULL;
-static Ecore_Idle_Enterer *_idle_flush = NULL;
 
 static Ecore_Event_Handler *mod_init_end = NULL;
 
@@ -977,10 +975,6 @@ main(int argc, char **argv)
    TS("E_Order Init Done");
    _e_main_shutdown_push(e_order_shutdown);
 
-   TS("Add Idler For X Flush");
-   _idle_flush = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
-   TS("Add Idler For X Flush Done");
-
    TS("E_Comp_Canvas Keys Grab");
    e_comp_canvas_keys_grab();
    TS("E_Comp_Canvas Keys Grab Done");
@@ -1090,8 +1084,6 @@ _e_main_shutdown(int errcode)
    _idle_before = NULL;
    if (_idle_after) ecore_idle_enterer_del(_idle_after);
    _idle_after = NULL;
-   if (_idle_flush) ecore_idle_enterer_del(_idle_flush);
-   _idle_flush = NULL;
 
    dir = getenv("XDG_RUNTIME_DIR");
    if (dir)
@@ -1743,6 +1735,7 @@ _e_main_cb_idle_after(void *data EINA_UNUSED)
 {
    static int first_idle = 1;
 
+   eet_clearcache();
    edje_freeze();
 
 #ifdef E_RELEASE_BUILD
@@ -1765,17 +1758,6 @@ _e_main_cb_idle_after(void *data EINA_UNUSED)
 }
 
 static Eina_Bool
-_e_main_cb_x_flusher(void *data EINA_UNUSED)
-{
-   eet_clearcache();
-#ifndef HAVE_WAYLAND_ONLY
-   if (e_comp->comp_type == E_PIXMAP_TYPE_X)
-     ecore_x_flush();
-#endif
-   return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
 _e_main_cb_startup_fake_end(void *data EINA_UNUSED)
 {
    e_init_hide();

-- 


Reply via email to