summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_draw_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-02-23 11:36:03 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-23 11:36:03 +0100
commit1af679dbd5b57bfcbeb646b586b03eb22f9b4383 (patch)
tree06230fd84c019d983fac360001d46bae3391c406 /src/lib/evas/common/evas_draw_main.c
parent93333ede152082c434e79e44b77d7d816b5305ea (diff)
Revert "Revert "evas: refcounting initialisation and protect things.""
This reverts commit 789633b321dbb0669b93ba2da3bbaaede3de6233. Now this should be useful since we have refactored the shutdown logic of all engine.
Diffstat (limited to 'src/lib/evas/common/evas_draw_main.c')
-rw-r--r--src/lib/evas/common/evas_draw_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_draw_main.c b/src/lib/evas/common/evas_draw_main.c
index 76328ff..27541bb 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -32,9 +32,13 @@ evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
32 } 32 }
33} 33}
34 34
35static int _init_count = 0;
36
35EAPI void 37EAPI void
36evas_common_init(void) 38evas_common_init(void)
37{ 39{
40 if (_init_count++) return ;
41
38 evas_common_cpu_init(); 42 evas_common_cpu_init();
39 43
40 evas_common_blend_init(); 44 evas_common_blend_init();
@@ -53,6 +57,8 @@ evas_common_init(void)
53EAPI void 57EAPI void
54evas_common_shutdown(void) 58evas_common_shutdown(void)
55{ 59{
60 if (--_init_count) return ;
61
56 evas_font_dir_cache_free(); 62 evas_font_dir_cache_free();
57 evas_common_font_shutdown(); 63 evas_common_font_shutdown();
58 evas_common_image_shutdown(); 64 evas_common_image_shutdown();