Revert "Revert "evas: refcounting initialisation and protect things.""

This reverts commit 789633b321.

Now this should be useful since we have refactored the shutdown logic of all engine.
This commit is contained in:
Cedric BAIL 2015-02-23 11:36:03 +01:00
parent 93333ede15
commit 1af679dbd5
1 changed files with 6 additions and 0 deletions

View File

@ -32,9 +32,13 @@ evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
}
}
static int _init_count = 0;
EAPI void
evas_common_init(void)
{
if (_init_count++) return ;
evas_common_cpu_init();
evas_common_blend_init();
@ -53,6 +57,8 @@ evas_common_init(void)
EAPI void
evas_common_shutdown(void)
{
if (--_init_count) return ;
evas_font_dir_cache_free();
evas_common_font_shutdown();
evas_common_image_shutdown();