cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=552a38cde553ee8e311ac0681c5f6ccbb9fc4935

commit 552a38cde553ee8e311ac0681c5f6ccbb9fc4935
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Feb 20 15:04:52 2015 +0100

    evas: refactor software engine initialisation.
---
 src/lib/evas/common/evas_draw_main.c                  |  4 ++--
 src/lib/evas/include/evas_common_private.h            |  4 ++--
 src/modules/evas/engines/buffer/evas_engine.c         | 13 +------------
 src/modules/evas/engines/drm/evas_engine.c            | 12 +-----------
 src/modules/evas/engines/fb/evas_engine.c             | 13 +------------
 src/modules/evas/engines/gl_cocoa/evas_engine.c       | 13 +------------
 src/modules/evas/engines/gl_drm/evas_engine.c         | 12 +-----------
 src/modules/evas/engines/gl_sdl/evas_engine.c         | 12 +-----------
 src/modules/evas/engines/gl_x11/evas_engine.c         | 12 +-----------
 src/modules/evas/engines/psl1ght/evas_engine.c        | 12 +-----------
 src/modules/evas/engines/software_ddraw/evas_engine.c | 13 +------------
 src/modules/evas/engines/software_gdi/evas_engine.c   | 13 +------------
 src/modules/evas/engines/software_x11/evas_engine.c   | 12 +-----------
 src/modules/evas/engines/wayland_egl/evas_engine.c    | 12 +-----------
 src/modules/evas/engines/wayland_shm/evas_engine.c    | 12 +-----------
 15 files changed, 17 insertions(+), 152 deletions(-)

diff --git a/src/lib/evas/common/evas_draw_main.c 
b/src/lib/evas/common/evas_draw_main.c
index d310fe5..570220b 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -32,7 +32,7 @@ evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int 
idx)
      }
 }
 
-void
+EAPI void
 evas_common_init(void)
 {
    evas_common_cpu_init();
@@ -49,7 +49,7 @@ evas_common_init(void)
    evas_common_tilebuf_init();
 }
 
-void
+EAPI void
 evas_common_shutdown(void)
 {
    evas_font_dir_cache_free();
diff --git a/src/lib/evas/include/evas_common_private.h 
b/src/lib/evas/include/evas_common_private.h
index 0160af5..aea5de4 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -1207,8 +1207,8 @@ extern "C" {
 #endif
 
 /****/
-void evas_common_init                                   (void);
-void evas_common_shutdown                               (void);
+EAPI void evas_common_init                                   (void);
+EAPI void evas_common_shutdown                               (void);
 
 EAPI void evas_common_cpu_init                          (void);
 
diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index 1e47cb5..27f8806 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -59,18 +59,7 @@ _output_setup(int w,
    if (!re)
      return NULL;
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    evas_buffer_outbuf_buf_init();
 
diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index 0d8582f..ba9cebd 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -104,17 +104,7 @@ eng_setup(Evas *evas, void *einfo)
      {
         /* NB: If we have no valid output then assume we have not been
          * initialized yet and call any needed common init routines */
-        evas_common_cpu_init();
-        evas_common_blend_init();
-        evas_common_image_init();
-        evas_common_convert_init();
-        evas_common_scale_init();
-        evas_common_rectangle_init();
-        evas_common_polygon_init();
-        evas_common_line_init();
-        evas_common_font_init();
-        evas_common_draw_init();
-        evas_common_tilebuf_init();
+        evas_common_init();
 
         /* try to create a new render_engine */
         if (!(re = _output_setup(info, epd->output.w, epd->output.h)))
diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index 3a02a69..b4822d9 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -35,18 +35,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int 
refresh)
    if (!re)
      return NULL;
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    evas_fb_outbuf_fb_init();
 
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c 
b/src/modules/evas/engines/gl_cocoa/evas_engine.c
index e5f8d40..2273ec4 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.c
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c
@@ -111,18 +111,7 @@ eng_setup(Evas *eo_e, void *in)
             return 0;
          }
 
-       evas_common_cpu_init();
-
-       evas_common_blend_init();
-       evas_common_image_init();
-       evas_common_convert_init();
-       evas_common_scale_init();
-       evas_common_rectangle_init();
-       evas_common_polygon_init();
-       evas_common_line_init();
-       evas_common_font_init();
-       evas_common_draw_init();
-       evas_common_tilebuf_init();
+        evas_common_init();
      }
    else
      {
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index d20f900..0599e98 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -593,17 +593,7 @@ eng_setup(Evas *eo_e, void *in)
 
         if (!initted)
           {
-             evas_common_cpu_init();
-             evas_common_blend_init();
-             evas_common_image_init();
-             evas_common_convert_init();
-             evas_common_scale_init();
-             evas_common_rectangle_init();
-             evas_common_polygon_init();
-             evas_common_line_init();
-             evas_common_font_init();
-             evas_common_draw_init();
-             evas_common_tilebuf_init();
+             evas_common_init();
              glsym_evas_gl_preload_init();
           }
 
diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c 
b/src/modules/evas/engines/gl_sdl/evas_engine.c
index 0aa9296..20d2c45 100644
--- a/src/modules/evas/engines/gl_sdl/evas_engine.c
+++ b/src/modules/evas/engines/gl_sdl/evas_engine.c
@@ -327,17 +327,7 @@ eng_setup(Evas *eo_e, void *in)
    e->engine.data.context = e->engine.func->context_new(e->engine.data.output);
 
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    return 1;
 
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 26bcd32..faeee6d 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1502,17 +1502,7 @@ eng_setup(Evas *eo_e, void *in)
 
         if (!initted)
           {
-             evas_common_cpu_init();
-             evas_common_blend_init();
-             evas_common_image_init();
-             evas_common_convert_init();
-             evas_common_scale_init();
-             evas_common_rectangle_init();
-             evas_common_polygon_init();
-             evas_common_line_init();
-             evas_common_font_init();
-             evas_common_draw_init();
-             evas_common_tilebuf_init();
+             evas_common_init();
              glsym_evas_gl_preload_init();
           }
 
diff --git a/src/modules/evas/engines/psl1ght/evas_engine.c 
b/src/modules/evas/engines/psl1ght/evas_engine.c
index 3fbf45a..56ed5f8 100644
--- a/src/modules/evas/engines/psl1ght/evas_engine.c
+++ b/src/modules/evas/engines/psl1ght/evas_engine.c
@@ -108,17 +108,7 @@ _output_setup(int w, int h)
    flipBuffer(re->context, MAX_BUFFERS - 1);
 
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    re->tb = evas_common_tilebuf_new(w, h);
 
diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c 
b/src/modules/evas/engines/software_ddraw/evas_engine.c
index 92300e6..dd1982c 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.c
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.c
@@ -34,18 +34,7 @@ _output_setup(int  width,
      return NULL;
 
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    evas_software_ddraw_outbuf_init();
 
diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c 
b/src/modules/evas/engines/software_gdi/evas_engine.c
index 153140f..b7216e7 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.c
+++ b/src/modules/evas/engines/software_gdi/evas_engine.c
@@ -34,18 +34,7 @@ _output_setup(int          width,
      return NULL;
 
    /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
+   evas_common_init();
 
    evas_software_gdi_outbuf_init();
 
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c 
b/src/modules/evas/engines/software_x11/evas_engine.c
index 42edec2..ddbbfdc 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -435,17 +435,7 @@ eng_setup(Evas *eo_e, void *in)
    if (!e->engine.data.output)
      {
         /* if we haven't initialized - init (automatic abort if already done) 
*/
-        evas_common_cpu_init();
-        evas_common_blend_init();
-        evas_common_image_init();
-        evas_common_convert_init();
-        evas_common_scale_init();
-        evas_common_rectangle_init();
-        evas_common_polygon_init();
-        evas_common_line_init();
-        evas_common_font_init();
-        evas_common_draw_init();
-        evas_common_tilebuf_init();
+        evas_common_init();
 
 #ifdef BUILD_ENGINE_SOFTWARE_XLIB
         if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index df4aa54..596e696 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -593,17 +593,7 @@ eng_setup(Evas *evas, void *info)
         /* if we have not initialize gl & evas, do it */
         if (!initted)
           {
-             evas_common_cpu_init();
-             evas_common_blend_init();
-             evas_common_image_init();
-             evas_common_convert_init();
-             evas_common_scale_init();
-             evas_common_rectangle_init();
-             evas_common_polygon_init();
-             evas_common_line_init();
-             evas_common_font_init();
-             evas_common_draw_init();
-             evas_common_tilebuf_init();
+             evas_common_init();
              glsym_evas_gl_preload_init();
           }
 
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c 
b/src/modules/evas/engines/wayland_shm/evas_engine.c
index c8a612e..e94e603 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -127,17 +127,7 @@ eng_setup(Evas *eo_evas, void *einfo)
 
         /* NB: If we have no valid output then assume we have not been 
          * initialized yet and call any needed common init routines */
-        evas_common_cpu_init();
-        evas_common_blend_init();
-        evas_common_image_init();
-        evas_common_convert_init();
-        evas_common_scale_init();
-        evas_common_rectangle_init();
-        evas_common_polygon_init();
-        evas_common_line_init();
-        evas_common_font_init();
-        evas_common_draw_init();
-        evas_common_tilebuf_init();
+        evas_common_init();
 
         if (try_swap == -1)
           {

-- 


Reply via email to